summaryrefslogtreecommitdiff
path: root/ext/dbx/dbx_odbc.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_odbc.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_odbc.c')
-rw-r--r--ext/dbx/dbx_odbc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dbx/dbx_odbc.c b/ext/dbx/dbx_odbc.c
index f13c0fcb06..3e4d0ef39a 100644
--- a/ext/dbx/dbx_odbc.c
+++ b/ext/dbx/dbx_odbc.c
@@ -78,13 +78,14 @@ int dbx_odbc_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS)
return 1;
}
-int dbx_odbc_query(zval ** rv, zval ** dbx_handle, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS) {
+int dbx_odbc_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 number_of_arguments=2;
zval ** arguments[2];
zval * queryresult_zval=NULL;
zval * num_fields_zval=NULL;
+ // db_name is not used in this function
arguments[0]=dbx_handle;
arguments[1]=sql_statement;
dbx_call_any_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, "odbc_exec", &queryresult_zval, number_of_arguments, arguments);