<?
$sql="SELECT * FROM tb_news WHERE status='Yes' ORDER BY id_news DESC";
$query=mysql_query($sql) or die (mysql_error());
$rows = mysql_num_rows($query);
echo$sql;
$no=1;
while($rec=mysql_fetch_assoc($rows)){ ///////////////////////////////////Error this line
echo$rec['title_news'];
?>
<div class="detail_news">
<ul>
<li style="padding-right:30px;"><?=$no?></li>
<li style="padding-right:275px;"><?=$rec['title_news']?></li>
<li style="padding-right:105px;"><?=$rec['status']?></li>
<li style="padding-right:60px;"><?=$rec['date_today']?></li>
<li style="padding-right:60px;"><a href="<?=$_SERVER['PHP_SELF']?>?action=edit&id_news=<?=$id_news?>">Edit</a></li>
<li><a href="<?=$_SERVER['PHP_SELF']?>?action=delete&id_news=<?=$id_news?>" onclick="return confirm('Are you sure you want to delete?')">Delete</a></li>
</ul>
</div>
<?
$no++;
}//while
SELECT * FROM tb_news WHERE status='Yes' ORDER BY id_news DESC
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in D:\AppServ\www\Nardanong.s\shop.weddingdress\_admin\news.php on line 51