From: [EMAIL PROTECTED] Operating system: FreeBSD 4.5 PHP version: 4.1.2 PHP Bug Type: MySQL related Bug description: CREATE DATABASE - No Database Selected
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 bug report at http://bugs.php.net/?id=16903&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16903&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16903&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16903&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16903&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16903&r=support Expected behavior: http://bugs.php.net/fix.php?id=16903&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16903&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16903&r=submittedtwice