且构网

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

如何在MySQL中将数组作为参数传递给存储过程?

更新时间:2023-09-17 23:08:04

  1. 我看不到sendMail()中任何地方定义的$certID.如果将其打印出来,您将获得什么价值?
  2. 我很确定您只是使用$this->input->post('sendMail');而不是$this->input->post('sendMail[]');来获取数组
  3. 您是否已确认您的(不安全的)SQL调用适用于自定义值?如果是这样,请确保您传递正确的值
  1. I can't see $certID defined anywhere in sendMail(). What value do you get if you print that out?
  2. I'm fairly sure you just use $this->input->post('sendMail'); instead of $this->input->post('sendMail[]'); to get the array
  3. Have you confirmed that your (unsafe) sql call works with custom values? If it does, make sure you're passing the correct values

尝试调试和疑难解答,您可能会找到原因.

Try debugging and troubleshooting and you'll probably find what's the cause.