iliaa Sun Jan 11 16:18:19 2004 EDT
Modified files:
/php-src/ext/pgsql pgsql.c
Log:
Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option).
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.302 php-src/ext/pgsql/pgsql.c:1.303
--- php-src/ext/pgsql/pgsql.c:1.302 Thu Jan 8 03:17:09 2004
+++ php-src/ext/pgsql/pgsql.c Sun Jan 11 16:18:19 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.302 2004/01/08 08:17:09 andi Exp $ */
+/* $Id: pgsql.c,v 1.303 2004/01/11 21:18:19 iliaa Exp $ */
#include <stdlib.h>
@@ -4424,8 +4424,11 @@
smart_str_appendc(&querystr, ';');
smart_str_0(&querystr);
- if (do_exec(&querystr, PGRES_COMMAND_OK, pg_link, opt TSRMLS_CC) == 0)
+ if ((opt & PGSQL_DML_EXEC) && do_exec(&querystr, PGRES_COMMAND_OK, pg_link,
opt TSRMLS_CC) == 0) {
ret = SUCCESS;
+ } else if (opt & PGSQL_DML_STRING) {
+ ret = SUCCESS;
+ }
cleanup:
if (var_converted) {
@@ -4517,8 +4520,11 @@
smart_str_appendc(&querystr, ';');
smart_str_0(&querystr);
- if (do_exec(&querystr, PGRES_COMMAND_OK, pg_link, opt TSRMLS_CC) == 0)
+ if ((opt & PGSQL_DML_EXEC) && do_exec(&querystr, PGRES_COMMAND_OK, pg_link,
opt TSRMLS_CC) == 0) {
ret = SUCCESS;
+ } else if (opt & PGSQL_DML_STRING) {
+ ret = SUCCESS;
+ }
cleanup:
if (!(opt & PGSQL_DML_NO_CONV)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php