Using PHP and mysqli_multi_query to create tables in database and insert some values. The code is below:
mysqli_multi_query($GLOBALS["mysqli"], $mysql_query) or die(mysqli_error($GLOBALS["mysqli"]));
The problem is that when invalid $mysql_query is used, it doesn't return any errors. For example, if $mysql_query looks like:
INSERT INTO table (col, col2) VALUES ('val1', 'val2', 'val3');
it doesn't die (and doesn't display any errors), but no data is inserted to the table of course. I need to copy/paste the same code into phpmyadmin to see what the error is. It ONLY dies if ABSOLUTELY INVALID query is used (like $mysql_query="abc123errorwhatever")
And even if I add text 'abc123errorwhatever' at the end of some valid query; it doesn't die too. No errors, nothing.