Re: cvs: php4 /ext/mysql php_mysql.c

From: Date: Sun, 28 Apr 2002 20:16:55 +0000
Subject: Re: cvs: php4 /ext/mysql php_mysql.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11506@lists.php.net to get a copy of this message
Hi, On Sun, Apr 28, 2002 at 07:06:13PM +0200, Georg Richter wrote : > On Sunday, 28. April 2002 08:38, Jani Taskinen wrote: > > sniper Sun Apr 28 02:38:13 2002 EDT > > > switch(ZEND_NUM_ARGS()) { > > case 1: > > @@ -791,20 +792,38 @@ > > } > > id = -1; > > break; > > + case 3: > > + if (zend_get_parameters_ex(3, &db, &mysql_link, &ret_prevdb)==FAILURE) > > { + RETURN_FALSE; > > + } > > + id = -1; > > + convert_to_long_ex(ret_prevdb); > > + ret_dbname = Z_LVAL_PP(ret_prevdb); > > + break; > > default: > > WRONG_PARAM_COUNT; > > break; > > } > > Hi jani, > > First I guess, this isn't a good idea. A additionally function like > mysql_current_db (and maybe mysql_current_user) would me much clearer and > easier to use. Additionally mysql_change_user should be reintroduced. > (I discussed this stuff with Zak a few days/weeks ago, maybe he can write > someting additionally too) > > Your changes in php_mysql.c: > > What happens, when you call mysql_select_db as follows: > > a) mysql_select_db ("yourdb", $link_identifier) or As it was always. > b) mysql_select_db("yourdb", true); Wrong link identifier, you will get an E_WARNING about the resource. > c) mysql_select_db("yourdb", $link_identifier, FALSE) equals mysql_select_db("yourdb", $link_identifier); (I've tested it all :-) - Markus -- Please always Cc to me when replying to me on the lists. GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc "Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

« previous php.cvs (#11506) next »