kensbeijing Posted February 10, 2009 Share Posted February 10, 2009 Is it possible to query an array? Something like below: $array = array(whatever...)mysql_query(SELECT * FROM table WHERE row_id = '$array') So it finds all the rows in the table which are the same as values in $array. Link to comment Share on other sites More sharing options...
Lulzim Posted February 10, 2009 Share Posted February 10, 2009 $array = array(1,2,3,4,5);$arr = implode(',', $array);mysql_query("SELECT * FROM table WHERE row_id IN (".$arr.")"); Link to comment Share on other sites More sharing options...
kensbeijing Posted February 11, 2009 Author Share Posted February 11, 2009 aaa ok thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.