Bug #9578 Updated: more mysql module info in phpinfo();
| From: | georg@php.net | Date: | Mon, 22 Jul 2002 06:29:53 +0000 |
| Subject: | Bug #9578 Updated: more mysql module info in phpinfo(); | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14763@lists.php.net to get a copy of this message | ||
ID: 9578
Updated by: georg@php.net
-Summary: mysql_select_db() returning currently seected database
-Reported By: wizaerd@wizaerd.com
+Reported By: Xuefer@21cn.com
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
-Operating System: Linux
+Operating System: all
-PHP Version: 4.0.4pl1
+PHP Version: 4.2.0
New Comment:
For this you can use use the SQL Statement "SELECT DATABASE()".
See also feature request #16495
Previous Comments:
------------------------------------------------------------------------
[2001-03-06 09:45:04] wizaerd@wizaerd.com
Typically in my code, I open and select a database in a prepended file,
and use that same database throughout my entire page. I've also been
building some modular plugins to my site that may require a different
database selected. It'd be nice if mysql_select_db() would return the
currently selected db so that in a plugin module I could do something
like this:
$OldDB = mysql_select_db( "SomeDB", $dbConnection );
/*
bunch of other code
*/
// return to main site
mysql_select_db( $OldDB, $dbConnection );
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=9578&edit=1