Hi,
While creating users in one of my application, the passowrd for the user has to obey the following rules.
password cannot be the same as the user name
password must have a minimum of six characters
password must have a maximum of 100 characters
password must have at least one alpha... (1 Reply)
Shell script help
Here is 3 sample lines from a log file
<date> INFO <java.com.blah> abcd:ID= user login
<date> DEBUG <java.com.blah> <nlah bla> abcd:ID=123 user login
<date> INFO <java.com.blah> abcd:ID=3243 user login
I want to find unique "ID" from this log... (3 Replies)
I have 84 files with the following names splitseqs.1, spliseqs.2 etc.
and I want to change the .number to a unique filename.
E.g.
change splitseqs.1 into splitseqs.7114_1#24
and
change spliseqs.2 into splitseqs.7067_2#4
So all the current file names are unique, so are the new file names.... (1 Reply)
I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks. (7 Replies)
Hi,
I have multiple files that each contain one column of strings:
File1:
123abc
456def
789ghi
File2:
123abc
456def
891jkl
File3:
234mno
123abc
456def
In total I have 25 of these type of file. (5 Replies)
Hi Experts,
I have csv file with 30, 40 columns
Pasting just 2 column for problem description.
Need to print error if below combination is not present in file
check for column-1 (DocumentNumber) and filter columns where value in DocumentNumber field is same.
For all such rows, the field... (7 Replies)
I can find and replace text when the delimiters are unique. What I cannot do is replace text using two NON-unique delimiters:
Ex.,
"This html code <text blah >contains <garbage blah blah >. All tags must go,<text > but some must be replaced with <garbage blah blah > without erasing other... (5 Replies)
Hello
Take this file...
Test01
Ref test
Version 01
Test02
Ref test
Version 02
Test66
Ref test
Version 66
Test99
Ref test
Version 99
I want to substitute every occurrence of Test{2} with a unique random number, so for example, if I was using sed, substitution would be something... (1 Reply)
Discussion started by: funkman
1 Replies
LEARN ABOUT PHP
pg_prepare
PG_PREPARE(3)PG_PREPARE(3)pg_prepare - Submits a request to create a prepared statement with the given parameters, and waits for completion.SYNOPSIS
resource pg_prepare ([resource $connection], string $stmtname, string $query)
DESCRIPTION pg_prepare(3) creates a prepared statement for later execution with pg_execute(3) or pg_send_execute(3). This feature allows commands that
will be used repeatedly to be parsed and planned just once, rather than each time they are executed. pg_prepare(3) is supported only
against PostgreSQL 7.4 or higher connections; it will fail when using earlier versions.
The function creates a prepared statement named $stmtname from the $query string, which must contain a single SQL command. $stmtname may
be "" to create an unnamed statement, in which case any pre-existing unnamed statement is automatically replaced; otherwise it is an error
if the statement name is already defined in the current session. If any parameters are used, they are referred to in the $query as $1, $2,
etc.
Prepared statements for use with pg_prepare(3) can also be created by executing SQL PREPARE statements. (But pg_prepare(3) is more flexi-
ble since it does not require parameter types to be pre-specified.) Also, although there is no PHP function for deleting a prepared state-
ment, the SQL DEALLOCATE statement can be used for that purpose.
PARAMETERS
o $connection
- PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection
is the last connection made by pg_connect(3) or pg_pconnect(3).
o $stmtname
- The name to give the prepared statement. Must be unique per-connection. If "" is specified, then an unnamed statement is cre-
ated, overwriting any previously defined unnamed statement.
o $query
- The parameterized SQL statement. Must contain only a single statement. (multiple statements separated by semi-colons are not
allowed.) If any parameters are used, they are referred to as $1, $2, etc.
RETURN VALUES
A query result resource on success or FALSE on failure.
EXAMPLES
Example #1
Using pg_prepare(3)
<?php
// Connect to a database named "mary"
$dbconn = pg_connect("dbname=mary");
// Prepare a query for execution
$result = pg_prepare($dbconn, "my_query", 'SELECT * FROM shops WHERE name = $1');
// Execute the prepared query. Note that it is not necessary to escape
// the string "Joe's Widgets" in any way
$result = pg_execute($dbconn, "my_query", array("Joe's Widgets"));
// Execute the same prepared query, this time with a different parameter
$result = pg_execute($dbconn, "my_query", array("Clothes Clothes Clothes"));
?>
SEE ALSO pg_execute(3), pg_send_execute(3).
PHP Documentation Group PG_PREPARE(3)