From 4532eebc4a916a392bdce386c9adde3cfa855ab9 Mon Sep 17 00:00:00 2001 From: Marc Boeren Date: Wed, 11 Apr 2001 08:14:57 +0000 Subject: 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! --- ext/dbx/dbx_odbc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/dbx/dbx_odbc.c') 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); -- cgit v1.2.1