Ver original$ids = array('id1','id2','etc'); mysql_query("SELECT * FROM tabla WHERE id IN (".implode(',',$ids).")");