From aadb1419417a43405e28a777a348399a00aa3279 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Tue, 9 Apr 2002 01:29:49 +0000 Subject: [PATCH] Added new function descriptions git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@77242 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/pgsql.xml | 293 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 290 insertions(+), 3 deletions(-) diff --git a/functions/pgsql.xml b/functions/pgsql.xml index 9591981704..041b820f2a 100644 --- a/functions/pgsql.xml +++ b/functions/pgsql.xml @@ -1,5 +1,5 @@ - + PostgreSQL functions PostgreSQL @@ -2333,7 +2333,9 @@ $dbconn4 = pg_connect ($conn_string); pg_escape_string escapes string for - text/char datatype. It returns escaped string. + text/char datatype. It returns escaped string for + PostgreSQL. Use of this functon is recommended instead of + addslashes. @@ -2376,7 +2378,293 @@ $dbconn4 = pg_connect ($conn_string); + + + + + + pg_metadata + + Get metadata for table. + + + + Description + + arraypg_metadata + resourceconnection + stringtable_name + + + pg_metadata returns table definition for + table_name as array. If there is error, it + returns &false + + + + This function is experimental. + + + + See also pg_convert + + + + + + + + pg_convert + + Convert associative array value into suitable for SQL statement. + + + + Description + + arraypg_convert + resourceconnection + stringtable_name + arrayassoc_array + + + pg_convert check and convert assoc_array suitable for SQL statement. + + + + This function is experimental. + + + + See also pg_metadata + + + + + + + + + pg_insert + + Insert array into table. + + + + Description + + boolpg_insert + resourceconnection + stringtable_name + arrayassoc_array + boolconvert + + + pg_insert inserts + assoc_array which has + field=>value into table specified as + table_name. If convert is + not specified or &true, pg_convert applied + to assoc_array. + + + pg_insert + + +]]> + + + + + This function is experimental. + + + + See also pg_convert + + + + + + + + + pg_select + + Select records. + + + + Description + + arraypg_select + resourceconnection + stringtable_name + arrayassoc_array + boolconvert + + + pg_select selects records specified by + assoc_array which has + field=>value. For successful query, it returns + array contains all records and fields that match the condition + specified by assoc_array. If + convert is not specified or &true, + pg_convert applied to + assoc_array. + + + pg_select + + +]]> + + + + + This function is experimental. + + + + See also pg_convert + + + + + + + + + pg_delete + + Delete records. + + + + Description + + longpg_delete + resourceconnection + stringtable_name + arrayassoc_array + boolconvert + + + pg_delete deletes record condition specified by + assoc_array which has + field=>value. If convert is + not specified or &true, pg_convert applied + to assoc_array. + + + pg_insert example + + +]]> + + + + + This function is experimental. + + + + See also pg_convert + + + + + + + + + pg_update + + Update table. + + + + Description + + longpg_update + resourceconnection + stringtable_name + arraycondition + arraydata + boolconvert + + + pg_update updates records that matches + condition with data If + convert is not specified or &true, + pg_convert applied to + assoc_array. + + + pg_insert example + + 'AA', 'field2'=>'BB'); + // This is safe, since $_POST is converted automatically + $res = pg_update($db, 'post_log', $_POST, $data); + if ($res) { + echo "Data is updated: $res\n"; + } + else { + echo "User must have sent wrong inputs\n"; + } +?> +]]> + + + + + This function is experimental. + + + + See also pg_convert + + + + -