$value){ $fid_array[] = $key; } $SQL.=" AND A.fid IN (".implode(',',$fid_array).") "; } $query = $db->query("SELECT SQL_CALC_FOUND_ROWS A.* FROM {$_pre}content A WHERE $SQL ORDER BY A.list DESC LIMIT $min,$rows"); $RS=$db->get_one("SELECT FOUND_ROWS()"); $totalNum=$RS['FOUND_ROWS()']; while($rs = $db->fetch_array($query)){ $ts = $db->get_one("SELECT * FROM {$_pre}content_$rs[mid] WHERE id='$rs[id]'"); if($ts){ $rs+=$ts; } $listdb[]=$rs; } return $listdb; } ?>