我怎么知道我的sql语句的执行出了什么问题

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?

I would suggest you running the sql statement in phpmyadmin to see what happens.

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 :


Also, to give some information that's probably more related to your question : you are saying (quoting) :

The statement is actually multiple statement set separated by ; ...

This is typically not supported by default functions.


For instance, the documentation of mysql_query() states (quoting) :

multiple queries are not supported

If you are using mysqli_* functions, take a look at mysqli::multi_query().

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 ";"