php从数据库选取记录形成列表(首页调用)
<ul class="e1">
<?php
$querySel = "select ID,Tit,Addtime from news where DShow = 1 and ClassID=1 order by Addtime desc limit 0,6";
$result_sub = mysql_query($querySel) or die(mysql_error());
while($row_sub=mysql_fetch_array($result_sub))
{
?>
<li><a href="NewsInfo.php?id=<?php echo $row_sub['ID'] ?>" target="_blank" class="tmain"><?php echo cut_str($row_sub['Tit'],14,0) ?></a><span><?php echo date('m-d', strtotime($row_sub['Addtime'])); ?></span></li>
<?php
}
?>
</ul>
----------------
Lynx
The quieter you become,the more you are able to hear.

浙公网安备 33010602011771号