Reputation: 8388
I execute a mysql statement via php, no exception is thrown, but nothing happens
The statement is actually multiple statement set separated by ; which should have created multiple tables
How can I check what went wrong?
Upvotes: 1
Views: 53
Reputation: 56377
You need to call mysql_query() for each query. You can't put them all within a single call, even though they are separated by ";"
Upvotes: 0
Reputation: 401062
It depend on the API you are using ; but those are generally providing a way of getting an error message, when a query fails.
See, typically :
The statement is actually multiple statement set separated by ; ...
This is typically not supported by default functions.
multiple queries are not supported
If you are using mysqli_*
functions, take a look at mysqli::multi_query()
.
Upvotes: 3
Reputation: 329
I would suggest you running the sql statement in phpmyadmin to see what happens.
Upvotes: 1