From 31089b442d19aea4b16f8533005f7c2606d51c91 Mon Sep 17 00:00:00 2001 From: Kouber Saparev Date: Tue, 4 Oct 2005 12:56:26 +0000 Subject: [PATCH] Multiple statements example & transaction explanations added (Bug #34719). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@197546 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pgsql/functions/pg-query.xml | 28 ++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/reference/pgsql/functions/pg-query.xml b/reference/pgsql/functions/pg-query.xml index cf5b8c442e..7f889aefd9 100644 --- a/reference/pgsql/functions/pg-query.xml +++ b/reference/pgsql/functions/pg-query.xml @@ -1,5 +1,5 @@ - + @@ -64,7 +64,9 @@ query - The SQL statement or statements to be executed. + The SQL statement or statements to be executed. When multiple statements are passed to the function, + they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands + included in the query string. However, using multiple transactions in one function call is not recommended. @@ -105,6 +107,28 @@ while ($row = pg_fetch_row($result)) { echo "
\n"; } +?> +]]> + + + + + + Using pg_query() with multiple statements + + ]]>