|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-06-27 07:59 UTC] zak@php.net
[2002-06-27 08:15 UTC] alan_k@php.net
[2002-07-01 14:18 UTC] hz11 at nyu dot edu
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 06:00:02 2025 UTC |
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