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)
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)
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)
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)
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)
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)
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)
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)
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_convert
PG_CONVERT(3)PG_CONVERT(3)pg_convert - Convert associative array values into suitable for SQL statementSYNOPSIS
array pg_convert (resource $connection, string $table_name, array $assoc_array, [int $options])
DESCRIPTION pg_convert(3) checks and converts the values in $assoc_array into suitable values for use in an SQL statement. Precondition for pg_con-
vert(3) is the existence of a table $table_name which has at least as many columns as $assoc_array has elements. The fieldnames in $ta-
ble_name must match the indices in $assoc_array and the corresponding datatypes must be compatible. Returns an array with the converted
values on success, FALSE otherwise.
Note
If there are boolean fields in $table_name don't use the constant TRUE in $assoc_array. It will be converted to the string 'TRUE'
which is no valid entry for boolean fields in PostgreSQL. Use one of t, true, 1, y, yes instead.
Warning
This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in
a future release of PHP. This function should be used at your own risk.
PARAMETERS
o $connection
- PostgreSQL database connection resource.
o $table_name
- Name of the table against which to convert types.
o $assoc_array
- Data to be converted.
o $options
- Any number of PGSQL_CONV_IGNORE_DEFAULT, PGSQL_CONV_FORCE_NULL or PGSQL_CONV_IGNORE_NOT_NULL, combined.
RETURN VALUES
An array of converted values, or FALSE on error.
EXAMPLES
Example #1
pg_convert(3) example
<?php
$dbconn = pg_connect('dbname=foo');
$tmp = array(
'author' => 'Joe Thackery',
'year' => 2005,
'title' => 'My Life, by Joe Thackery'
);
$vals = pg_convert($dbconn, 'authors', $tmp);
?>
SEE ALSO pg_meta_data(3).
PHP Documentation Group PG_CONVERT(3)