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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 24 = ?
Subscribe to this entry?

 
 [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-2022 The PHP Group
All rights reserved.
Last updated: Thu May 26 21:05:44 2022 UTC