PHP bind_params with null

旧巷老猫 提交于 2019-12-01 04:11:38

bind_param works by reference. That means that it takes a variable, then uses the value of that variable in execute.

null is not a variable.

Try setting a variable to null and then binding that variable instead.

(Also consider using PDO instead of mysqli, where the execute method can take a simple array and you can bypass wacky binding methodology of mysqli.)

Keep in mind that you can't use bind_param twice, because the last statement will replace the first. Try to find a way to use bind_param just once.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!