php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #9578 more mysql module info in phpinfo();
Submitted: 2001-03-06 09:45 UTC Modified: 2002-07-22 02:29 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: wizaerd at wizaerd dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.2.0 OS: all
Private report: No CVE-ID: None
 [2001-03-06 09:45 UTC] wizaerd at wizaerd dot 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 );

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-22 02:29 UTC] georg@php.net
For this you can use use the SQL Statement "SELECT DATABASE()".

See also feature request #16495
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 11:01:27 2024 UTC