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 + + ]]>