note 28182 added to function.pg-send-query
| From: | Ron at rack1 dot php dot net | Date: | Sun, 05 Jan 2003 01:20:16 +0000 |
| Subject: | note 28182 added to function.pg-send-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41676@lists.php.net to get a copy of this message | ||
If there is an error in one of your queries, the queries following it will not get executed, and
there will *not* be an error message displayed. The only way I can think of to determine if an SQL
error happened is to use pg_trace.
Example:
pg_send_query($connection,
"SELECT id FROM users;
SELECT * FROM customers;
[INVALID-SQL-STATEMENT];
SELECT name FROM countries;");
while ($result = pg_get_result($connection))
$results[] = $result;
The $results array will only have two items in it.
--
http://www.php.net/manual/en/function.pg-send-query.php
http://master.php.net/manage/user-notes.php?action=edit+28182
http://master.php.net/manage/user-notes.php?action=delete+28182
http://master.php.net/manage/user-notes.php?action=reject+28182