一、帝国cms sql语句和php切换使用;
<?php
$jbid = $navinfor["jb_id"];
if($jbid){
$query="SELECT * FROM phome_ecms_lecturer where id in ($jbid) order by id desc limit 24";
$sql=$empire->query($query);
while ($r = $empire->fetch( $sql )){
$html = '<li>
<p class="p1"><a href="'.$r[titleurl].'" target="_blank" title="'.$r[title].'"><img src="'.$r[titlepic].'" width="115" height="115"></a></p>
<p class="p2"><a href="'.$r[titleurl].'" target="_blank" title="'.$r[title].'">'.$r[title].'</a></p>
<p class="p3">'.$r[lecturer_title].'</p>
</li>';