Select using a php variable with more than one ID

rayvon-

New Member
I have a PHP variable that looks like this for example:\[code\]$list = "12|421|466|501|1042|"\[/code\]What I wanna do is to match each number with a field in my database table.\[code\]SELECT * FROM tableName WHERE id = any of the numbers in $list\[/code\]Which is the simplest way to do this?
 
Back
Top