mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option).
This commit is contained in:
parent
ac5d5c7f35
commit
3b7da77480
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user