0

I'm trying to use the mysql IN(,) function for flutter use, to retrieve two values from a single column

"SELECT * from TABLE WHERE COLUMN IN (VAL1,VAL2) "<= Now this works fine in thunder client, I just want to implement it for flutter use, I tried:

"SELECT * from TABLE WHERE COLUMN IN (?,?) " <= but I didn't know how to assign it to the PHP variables.

please help

  • Does this answer your question? [How to use PDO prepared statements with IN clause?](https://stackoverflow.com/questions/37827340/how-to-use-pdo-prepared-statements-with-in-clause) – Justinas Apr 28 '23 at 08:17

1 Answers1

0

If you just want to concat PHP variable to a string, try this:

"SELECT * from TABLE WHERE COLUMN IN ('".$VAL1."','".$VAL2."') ";
Grykarreos
  • 14
  • 3