-1

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);
}
Dharman
  • 21,838
  • 18
  • 57
  • 107
  • http://stackoverflow.com/questions/22531943/speed-best-practice-flushing-mysqli-multi-query – Your Common Sense May 11 '14 at 08:52
  • 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)); – user1987363 Jan 19 '13 at 18:59

1 Answers1

1

Because you have to use mysqli_next_result() and others first. See: http://php.net/manual/es/mysqli.multi-query.php#102837

Bugs
  • 4,356
  • 9
  • 30
  • 39
Anonimo
  • 11
  • 1