Re: DB::MySQL
| From: | Paul DuBois | Date: | Mon, 10 Jun 2002 14:44:08 +0000 |
| Subject: | Re: DB::MySQL | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6887@lists.php.net to get a copy of this message | ||
At 15:49 +0200 6/10/02, Uli Suppa wrote:
yes, it would.I suggest that it wouldn't. mysql_list_dbs() should be avoided, because it's deprecated. Anyway, it requires that you be connected in the first place, and if you have to select a database in order to connect, it doesn't really solve the problem. Better to not require a database to be specified. Not just for getting a list of databases, but also in case you want something like other forms of server metadata (VERSION(), for example). There's no need for a database in such instances.
----- Original Message ----- From: "Tomas V.V.Cox" <cox@idecnet.com> To: "Uli Suppa" <USuppa@yahoo.de> Cc: <pear-dev@lists.php.net> Sent: Monday, June 10, 2002 3:43 PM Subject: Re: [PEAR-DEV] DB::MySQLUli Suppa wrote:Hi Guys, i got a suggestion for this class, because it is possible to connect do the db server without selecting a database, i want to query the server to list all available databases and then select one to connect to. i've done this by getListOf("databases"), but this only works, if we are connected to a db. i commented out if (!@mysql_select_db($this->_db, $this->connection)) {return $this->mysqlRaiseError(DB_ERROR_NODBSELECTED);in mysql.php function simpleQuery(). could we change something there ?Would the use of mysql_list_dbs() solve the problem? Tomas V.V.Cox_________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php