56,866
社区成员




include @dirname(__FILE__) . '/conn.php';
mysql_select_db("news",$db);
mysql_query("SET NAMES utf8");
$result = @mysql_query("SELECT table_name,id,title,content,my_index,date,image FROM ((SELECT 'a' as table_name,id,title,content,my_index,date,image FROM table1 where image!='' and MATCH (my_index) AGAINST ('".$bool."' IN BOOLEAN MODE) Order By date DESC LIMIT 10) UNION ALL (SELECT 'b' as table_name,id,title,content,my_index,date,image FROM table2 where image!='' and MATCH (my_index) AGAINST ('".$bool."' IN BOOLEAN MODE) Order By date DESC LIMIT 10)) t group by title Order By date DESC LIMIT 15");
if(mysql_num_rows($result)>0){
while($data = mysql_fetch_array($result)){
//
}
}
mysql_close($db);