日期: 2021-09-23 12:25:46 人气: -
代码说明:通过Execute方法执行SQL语句,然后通过while循环将GetArray方法获取出来的记录循环出来
<?php
$dosql->Execute("SELECT * FROM `#@__infolist` WHERE (classid=4 or parentid=4) AND delstate='' AND checkinfo=true ORDER BY orderid,id DESC LIMIT 0,3");
while($row = $dosql->GetArray())
{
if($row['linkurl'] == '') $gourl = 'newsshow.php?cid='.$row['classid'].'&id='.$row['id'];
else $gourl = $row['linkurl'];
?>
<a href="<?php echo $gourl; ?>" style="color:<?php echo $row['colorval']; ?>;font-weight:<?php echo $row['boldval']; ?>;"><?php echo ReStrLen($cityname.$row['title'],14); ?></a><?php echo GetDateMk($row['posttime']); ?>
<?php
}
?>
城市百度数据报告进入全国两会引起... 2011-05-29
城市首届百度高校互联网产品设计大... 2011-05-29
城市百度启动“应用基金奖励计划” 2011-05-29