Bug #16903 Updated: CREATE DATABASE - No Database Selected

From: Date: Thu, 27 Jun 2002 12:15:05 +0000
Subject: Bug #16903 Updated: CREATE DATABASE - No Database Selected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12236@lists.php.net to get a copy of this message
ID: 16903 Updated by: alan_k@php.net Reported By: hz11@nyu.edu Status: Feedback Bug Type: MySQL related Operating System: FreeBSD 4.5 PHP Version: 4.1.2 Assigned To: zak New Comment: may also be worth noting whether you are using the mysql bundled code or the shared library ./configure --with-mysql=/usr/local or just ./configure ? Previous Comments: ------------------------------------------------------------------------ [2002-06-27 07:59:53] zak@php.net Hi Hans, I cannot reproduce the problem under PHP-4.3.0 Dev Please try upgrading to the latest version of PHP. If the problem still exists, please also provide details on the version of MySQL that you are trying to access. Regarding your question, please submit a bug report with a category of Feature Request! Thanks! ------------------------------------------------------------------------ [2002-04-29 09:44:06] hz11@nyu.edu I've found what looks to be a wierd little problem. When executing something like: mysql_query('CREATE DATABASE mynewdb', $mysql_link); I get the error 'No database Selected'. In the mysql client (local, CLI) this of course works as it should. I've looked at mysql_create_db() in the manual, but it says it's deprecated and that a 'CREATE DATABASE' query should be executed using mysql_query(). There's something wrong here. On a sidenote, I'm curious if there is any way (or plans to allow) multiple queries per mysql_query() run? For instance: mysql_query('CREATE DATABASE mynewdb; CREATE TABLE newtable (id TINYINT NOT NULL);', $mysql_link); Currently, I would get a SQL syntax error at the first semicolon. Is there a way to do this? Or is there plans to add it in the future? Thank you, Hans ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16903&edit=1

« previous php.bugs (#12236) next »