summaryrefslogtreecommitdiff
path: root/ext/dbx/dbx_pgsql.c
diff options
context:
space:
mode:
authorMarc Boeren <mboeren@php.net>2001-04-11 08:14:57 +0000
committerMarc Boeren <mboeren@php.net>2001-04-11 08:14:57 +0000
commit4532eebc4a916a392bdce386c9adde3cfa855ab9 (patch)
tree5a83c30e37a3630bebf211b07b63dc1ee9759560 /ext/dbx/dbx_pgsql.c
parent5ee8bfebb422d6a2cd2214d52c689fa2199633a0 (diff)
downloadphp-git-4532eebc4a916a392bdce386c9adde3cfa855ab9.tar.gz
Added a database member to the dbx_link object. Since e.g. mysql reuses
connections, two or more dbx_link objects may share the connection identifier. The database name is used in the dbx_query, where it calls mysql_db_query instead of mysql_query. This means the database name has to be passed around to all dbx_xxx_query functions, hence the update on all the files. (Mc) # Thanks to Christian Rabe for all the input on this issue!
Diffstat (limited to 'ext/dbx/dbx_pgsql.c')
-rw-r--r--ext/dbx/dbx_pgsql.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dbx/dbx_pgsql.c b/ext/dbx/dbx_pgsql.c
index 2f6b6ec514..ecafaa18b9 100644
--- a/ext/dbx/dbx_pgsql.c
+++ b/ext/dbx/dbx_pgsql.c
@@ -138,13 +138,14 @@ int dbx_pgsql_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS
return 1;
}
-int dbx_pgsql_query(zval ** rv, zval ** dbx_handle, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
+int dbx_pgsql_query(zval ** rv, zval ** dbx_handle, zval ** db_name, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
/* returns 1 as long or a result identifier as resource on success
or 0 as long on failure */
int nargs=2;
zval **args[2];
zval *returned_zval=NULL, *num_rows_zval=NULL;
+ // db_name is not used in this function
args[0]=dbx_handle;
args[1]=sql_statement;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "pg_exec", &returned_zval, nargs, args);