“Commands out of sync; you can't run this command now” - Caused by mysqli::multi_query

前端 未结 3 1253
再見小時候
再見小時候 2020-12-19 03:03

I am running multiple deletes through mysqli::multi_query and it is messing up the next query in line. The following error is being thrown.

Er         


        
3条回答
  •  半阙折子戏
    2020-12-19 04:01

    Seva's code will most likely fix your issue, if you're using procedural style like me, use this

    do {
      if ($result = mysqli_store_result($connect)) {
        mysqli_free_result($result);
      }
    } while (mysqli_next_result($connect));
    

提交回复
热议问题