tags:

views:

24

answers:

1

When I use mysqli_multi_query() with a mass INSERT query, then after the query has run do another query using mysqli_query('SELECT...'), I get "commands out of sync" errors. Does anyone know why this happens?

+1  A: 

You've to call mysqli_use_result (or mysqli_store_result) after a mysqli_multi_query() call.

Lower level documentation about this error: http://dev.mysql.com/doc/refman/5.1/en/commands-out-of-sync.html

Lekensteyn
That worked. Thanks.
Reado