dadamssg Posted August 12, 2009 Share Posted August 12, 2009 i have an array ($topic_ids) that i want to combine with a simple query like this SELECT * FROM Topics WHERE topic_id = $topic_ids how do i got about doing this? Link to comment https://forums.phpfreaks.com/topic/169872-query-based-on-an-array/ Share on other sites More sharing options...
trq Posted August 12, 2009 Share Posted August 12, 2009 This is a php question. $sql = "SELECT * FROM Topics WHERE topic_id IN('" . implode("','", $topic_ids) . "')"; Link to comment https://forums.phpfreaks.com/topic/169872-query-based-on-an-array/#findComment-896219 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.