I have a problem with mysqli_multi_query
. I tried to execute code but the mysqli_query
after mysqli_multi_query
doesn't work. $query1
update values and no return results.
if(mysqli_multi_query($con,$query1))
{
$query2="insert into tablename values (1,2,3);";
mysqli_query($con,$query2);
}
Try adding "trigger_error" to your query. It should show you what's happening wrong.
Like this:
mysqli_query($con,$query2) or trigger_error(mysqli_error($con));
Because you have to use mysqli_next_result()
and others first. See: http://php.net/manual/es/mysqli.multi-query.php#102837