Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option).

This commit is contained in:
Ilia Alshanetsky 2004-01-11 21:18:19 +00:00
parent ac5d5c7f35
commit 3b7da77480

View File

@ -4424,8 +4424,11 @@ PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *var
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 @@ PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids
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)) {