那么我就把多表记录在这
<?php $spacesql=$empire->query("select * from ( (select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news where istop=1 order by newstime desc limit 13 ) Union All (select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news1 where istop=1 order by newstime desc limit 13) Union All (select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news2 where istop=1 order by newstime desc limit 13) Union All (select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news3 where istop=1 order by newstime desc limit 13) ) as A order by newstime desc limit 20"); while($spacer=$empire->fetch($spacesql)) { $titleurl=sys_ReturnBqTitleLink($spacer);//链接 ?> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px;" onmouseover="this.style.backgroundColor='#eeeeee'" onmouseout="this.style.backgroundColor='#ffffff'"> <tr> <td width="84%" class="title">标题:<a href="<?=$titleurl?>" target="_blank"><?=$spacer[title]?></a></td> <td width="16%" class="time"><?=date('Y-m-d',$spacer[newstime])?> </td> </tr> </table> <? } ?>
|