0

I am struggling with the MySQL paramaterized query I am trying to write. It has "WHERE IN" in the conditions and I want to pass it a list of strings. First I tried passing it one comma seperated string to the paramater. But everything after the first value did not work. I assume it stripped the commas and everything after the comma. Here is the query:

SELECT itemref, name FROM cart_item ci WHERE ci.itemref IN (?itemrefstring) AND (quantity < 5 OR active = 0);

Now I am passing a commma seperated values string into itemrefstring. That did not work. I tried passing the list of strings to that parameter. That did not work either.

dmikester1
  • 1,374
  • 11
  • 55
  • 113

0 Answers0