我有这个查询,但结果只是数据库表中的最后一行
(我想显示表中的所有行:
$sql = mysql_query("SELECT * FROM LESSONS WHERE L_STATE='0' ORDER BY ID DESC") or die($sql_error);
if(mysql_num_rows($sql) > 0){
$resultset = array();
while($rs = mysql_fetch_assoc($sql)){
$resultset[] = $rs;
}
foreach ($resultset as $rs){
$l_id = $rs['ID'];
$l_title = $rs['L_TITLE'];
$l_comments = $rs['L_COMMENTS'];
$l_views = $rs['L_VIEWS'];
}
}else{
$l_id = $no_data;
$l_title = $no_data;
$l_comments = $no_data;
$l_views = $no_data;
}