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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wizaerd at wizaerd dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 16:01:31 2025 UTC