05-16-2013
Few questions:
I need table_name[c] value in another variable. for ex:a
SO, if i echo $a , it should give table_name1
if i echo $table_name1 it should give the first table name in the i/p file.
Can't we do it in simple scripting? i mean using loops?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm writing a KSH script, and at one point, I have to call a new shell and perform some variable assignments.
I noticed that the assignment is not working.
Please see two samples below:
Command 1:
#>ksh "i=2;echo I is $i"
Output:
#>I is
Command 2:
#>ksh <<EOF
> i=2
> echo I... (7 Replies)
Discussion started by: maverick80
7 Replies
2. Shell Programming and Scripting
Hi!
1. I have a parameter file containing path to log files. For this example both paths are the same, one is stated directly and the second using env variables.
/oracle/admin/orcl/bdump/:atlas:trc:N
${ORACLE_BASE}/admin/${ORACLE_SID}/bdump/:${ORACLE_SID}:trc:N
2. I try to parse the path... (1 Reply)
Discussion started by: lojzev
1 Replies
3. Shell Programming and Scripting
I am new to shell scripting and I have to to the following
I have a flat file with storename(lenth 20) , emailaddress(lenth 40), location(15). There is NO delimiters in that file.
Like the following str00001.txt
StoreName emailaddress location... (3 Replies)
Discussion started by: willywilly
3 Replies
4. Shell Programming and Scripting
Hi,
I am using #!/bin/sh shell. I have a variable which contains multi line data. I want to read that variable line by line. Can someone post the code to read the multi line variable line by line?
Any help is much appreciated. (2 Replies)
Discussion started by: gupt_ash
2 Replies
5. Shell Programming and Scripting
Hello Everyone,
Over the last few months I have begun to expand my programing skills from windows, Java and SQL / PL-SQL programing into the wonderful world of shell scripting. With little training budget my only options for training are books, Internet and this site (BTY... (1 Reply)
Discussion started by: caddis
1 Replies
6. Shell Programming and Scripting
hi I need help urgently...i need to write a shell script which can solve the following problem....its urgent plz help me out coz m totally newbie in shell scripting....
the problem is:
Suppose I have a folder called logs. whenever some error occurs some correspondence error file is generated.
I... (4 Replies)
Discussion started by: sukhdip
4 Replies
7. Shell Programming and Scripting
Hi ,
i have a parameter which has path of a file. Now i need to have another parameter with the content of that file. I tried the belwo script , can any one please help.
I dont want to use cat command to read. Can we do it with out using cat command.
while read line
do... (9 Replies)
Discussion started by: Ravindra Swan
9 Replies
8. Shell Programming and Scripting
Am still learning Scripting and I come across a build command that I don't really understand
if /local/bin/wsname 2>/dev/null; then
base="`/local/bin/wsname`"
export base
fi
if ; then
/local/bin/wsname
exit 1
fi
WSNAME="$base"/
can some one in light me to what... (1 Reply)
Discussion started by: Wpgn
1 Replies
9. Shell Programming and Scripting
Hello all,
I have small script:
# SCRIPT
COMMONFILEPATH=$WORKDIR/samples/... (4 Replies)
Discussion started by: emily
4 Replies
10. Shell Programming and Scripting
I have a section of a script where I want to check a log file for a certain oracle error and if there is only one error (and it is ORA-39152) then I want to email that script is complete. Otherwise email failure and log.
Somehow with this while the log only has one error and it is ORA-39152, I... (5 Replies)
Discussion started by: cougartrace
5 Replies
LEARN ABOUT PHP
pg_delete
PG_DELETE(3) PG_DELETE(3)
pg_delete - Deletes records
SYNOPSIS
mixed pg_delete (resource $connection, string $table_name, array $assoc_array, [int $options = PGSQL_DML_EXEC])
DESCRIPTION
pg_delete(3) deletes records from a table specified by the keys and values in $assoc_array. If $options is specified, pg_convert(3) is
applied to $assoc_array with the specified options.
PARAMETERS
o $connection
- PostgreSQL database connection resource.
o $table_name
- Name of the table from which to delete rows.
o $assoc_array
- An array whose keys are field names in the table $table_name, and whose values are the values of those fields that are to be
deleted.
o $options
- Any number of PGSQL_CONV_FORCE_NULL, PGSQL_DML_NO_CONV, PGSQL_DML_ESCAPE, PGSQL_DML_EXEC, PGSQL_DML_ASYNC or PGSQL_DML_STRING
combined. If PGSQL_DML_STRING is part of the $options then query string is returned. When PGSQL_DML_NO_CONV or PGSQL_DML_ESCAPE is
set, it does not call pg_convert(3) internally.
RETURN VALUES
Returns TRUE on success or FALSE on failure. Returns string if PGSQL_DML_STRING is passed via $options.
EXAMPLES
Example #1
pg_delete(3) example
<?php
$db = pg_connect('dbname=foo');
// This is safe, since $_POST is converted automatically
$res = pg_delete($db, 'post_log', $_POST);
if ($res) {
echo "POST data is deleted: $res
";
} else {
echo "User must have sent wrong inputs
";
}
?>
CHANGELOG
+-------------+---------------------------------------------------+
| Version | |
| | |
| | Description |
| | |
+-------------+---------------------------------------------------+
| 5.6.0 | |
| | |
| | No longer experimental. Added PGSQL_DML_ESCAPE |
| | constant, TRUE/ FALSE and NULL data type support. |
| | |
|5.5.3/5.4.19 | |
| | |
| | Direct SQL injection to $table_name and Indirect |
| | SQL injection to identifiers are fixed. |
| | |
+-------------+---------------------------------------------------+
SEE ALSO
pg_convert(3).
PHP Documentation Group PG_DELETE(3)