$totalquery="select count(*) as total from {$dbtbpre}enewspl_1 where username='$user[username]'".$a;
$num=$empire->gettotal($totalquery);
$query="select * from {$dbtbpre}enewspl_1 where username='$user[username]'".$a;
$query.=" order by plid desc limit $offset,$line";
$sql=$empire->query($query);
$returnpage=page1($num,$line,$page_line,$start,$page,$search);
前台展示代码
<?php
while($r=$empire->fetch($sql)){
$t=$empire->fetch1("select * from {$dbtbpre}ecms_news where id='$r[id]' and classid='$r[classid]'");
?>
<tr bgcolor="#FFFFFF">
<td height="25"> <div align="left"><?=$r[saytext]?></div></td>
<td height="25"> <div align="center"> <a class="key_word" href="<?=$t[titleurl]?>" target="_blank"><?=$t[title]?></a></div></td>
<td height="25"> <div align="center"><?=date('Y-m-d H:i:s',$r[saytime])?></div></td>
</tr>
<?php
}
?>