remove nonexistant PG_query mode

This commit is contained in:
Matthew Bucci
2023-11-09 21:24:38 -08:00
parent 20f0d7b9e9
commit 259a58b144

View File

@@ -512,10 +512,7 @@ function wpsqli_rollback($connection, $flags = 0, $name = null)
* *
* This function is a wrapper for the pg_query function. The pg_query function performs * This function is a wrapper for the pg_query function. The pg_query function performs
* a query against the database and returns a result set for successful SELECT queries, or TRUE * a query against the database and returns a result set for successful SELECT queries, or TRUE
* for other successful DML queries such as INSERT, UPDATE, DELETE, etc. It can also be used * for other successful DML queries such as INSERT, UPDATE, DELETE, etc.
* to execute multiple queries if the database server supports it. The function can return FALSE
* on failure. The optional third parameter defines the result mode - whether to use a resultset
* buffering (pg_STORE_RESULT) or not (pg_USE_RESULT).
* *
* @param pg $connection The pg connection resource. * @param pg $connection The pg connection resource.
* @param string $query The SQL query to be executed. * @param string $query The SQL query to be executed.
@@ -523,7 +520,7 @@ function wpsqli_rollback($connection, $flags = 0, $name = null)
* @return mixed Returns a pg_result object for successful SELECT queries, TRUE for other * @return mixed Returns a pg_result object for successful SELECT queries, TRUE for other
* successful queries, or FALSE on failure. * successful queries, or FALSE on failure.
*/ */
function wpsqli_query($connection, $query, $result_mode = pg_STORE_RESULT) function wpsqli_query($connection, $query, $result_mode = 0)
{ {
// Check if a connection to Postgres database is established // Check if a connection to Postgres database is established
if (!$GLOBALS['pg4wp_conn']) { if (!$GLOBALS['pg4wp_conn']) {