这样的两个语句能否结合为一句。
$get_rows = mysql_num_rows("select id from news where class_type='类别'");<br /><br />if($get_rows){<br /> $get_list=mysql_fetch_array("select * from news where class_type='类别'");<br /> .......循环显示<br />}
$rs = mysql_query("select id from news where class_type='类别'");<br />if($get_rows = mysql_num_rows($rs)) {<br /> $get_list = mysql_fetch_array($rs);<br /> .......循环显示<br />}
<br />$rs = mysql_query("select id from news where class_type='类别'");<br /><br />$get_list = array();<br /><br />while($row = mysql_fetch_array($rs) ){<br /> array_push($get_list, $row['id']);<br />}<br />$get_rows = count($get_list);<br />