Commands out of sync; you can't run this command now

前端 未结 21 2949
庸人自扰
庸人自扰 2020-11-21 11:35

I am trying to execute my PHP code, which calls two MySQL queries via mysqli, and get the error \"Commands out of sync; you can\'t run this command now\".

Here is th

21条回答
  •  清歌不尽
    2020-11-21 12:21

    Once you used

    stmt->execute();
    

    You MAY close it to use another query.

    stmt->close();
    

    This problem was hunting me for hours. Hopefully, it will fix yours.

提交回复
热议问题