"select from mysql table where field='$array'?" Answer’s

0

Use IN:

$sql = "SELECT * FROM `myTable` WHERE `myField` IN (1,40,20,55,29,48)";

you can use implode(",", $array) to get the list together from the array.

Wednesday, March 31, 2021
 
laurent
answered 11 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share