Re: cvs: php4 /ext/mysql php_mysql.c
| From: | Georg Richter | Date: | Sun, 28 Apr 2002 17:06:13 +0000 |
| Subject: | Re: cvs: php4 /ext/mysql php_mysql.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-11504@lists.php.net to get a copy of this message | ||
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
b) mysql_select_db("yourdb", true);
c) mysql_select_db("yourdb", $link_identifier, FALSE)
Regards
Georg