$get_rows = mysql_num_rows("select id from news where class_type='类别'");
if($get_rows){
$get_list=mysql_fetch_array("select * from news where class_type='类别'");
.......循环显示
}
------解决思路----------------------
很遗憾,非但不能合并为一句,相反要分作三句
$rs = mysql_query("select id from news where class_type='类别'");
if($get_rows = mysql_num_rows($rs)) {
$get_list = mysql_fetch_array($rs);
.......循环显示
}
------解决思路----------------------
$rs = mysql_query("select id from news where class_type='类别'");
$get_list = array();
while($row = mysql_fetch_array($rs) ){
array_push($get_list, $row['id']);
}
$get_rows = count($get_list);
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群