mysqli why does this happens?

前端 未结 3 2026
心在旅途
心在旅途 2021-01-29 03:29

I have two subsequent mysqli statements, and the second returns:

Fatal error: Call to a member function bind_param() on a non-object in ...

相关标签:
3条回答
  • 2021-01-29 03:46

    Something might have gone wrong with $db->prepare(), check $db->error.

    0 讨论(0)
  • 2021-01-29 03:54

    Check the return value of mysqli::prepare. If it is FALSE, you should get the details for the occured error with mysqli::error.

    0 讨论(0)
  • 2021-01-29 04:04

    I think your $stmt variable is null when you call bind_param over it. maybe your $_POST['vote'] is empty? you can check it before you bind the param on the command

    0 讨论(0)
提交回复
热议问题