hassank1 Posted May 12, 2008 Share Posted May 12, 2008 I've an array $arr .. what's the query to select all IDs that exist in this array ? thx Link to comment https://forums.phpfreaks.com/topic/105299-sql-query-search-in-array/ Share on other sites More sharing options...
craygo Posted May 12, 2008 Share Posted May 12, 2008 you would need to implode the array $ids = implode("', '", $arr); $sql = SELECT * FROM table WHERE id IN ('$ids'); Ray Link to comment https://forums.phpfreaks.com/topic/105299-sql-query-search-in-array/#findComment-539210 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.