时间:2021-07-01 10:21:17 帮助过:45人阅读
$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);