且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在mysqli预准备语句中使用IN子句

更新时间:2022-12-28 22:29:18

看看之前在这里提出的类似问题的答案(第二个代码示例):

Look at the answer to a similar question that has been asked here before (second code sample):

I have an array of integers, how do I use each one in a mysql query (in php)?

它归结为:

  • 使用正确数量的问号创建SQL字符串
  • 使用call_user_func_array()将您的数组绑定到查询字符串
  • create the SQL string with the right amount of question marks
  • use call_user_func_array() to bind your array to the query string