Cannot combine MySQL queries into one?
When I try to tell MySQL to create two tables in a single query from php nothing shows up in the DB:
Code:
$query = 'CREATE TABLE table1(
cid INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(cid));
CREATE TABLE table2(
cid INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(cid))';
mysql_query($query);
If I split it into two queries it works fine:
Code:
$query = 'CREATE TABLE table1(
cid INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(cid))';
mysql_query($query);
$query = 'CREATE TABLE table2(
cid INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(cid))';
mysql_query($query);
Is there something wrong with my syntax? It works fine when I submit the query in phpmyadmin.