connect(); if (is_int($id)) {die ("非法操作!");} //判断$id值是否合法。 ?>
首页 -> 新闻频道 -> 专题报道
专.题.报.道
connect(); $tablename="zhuanti,bginfo "; $pageSize=7; $goPage=$goPage; $selcetFields="zhuanti.name,bginfo.* "; $sqlConditions="and zhuanti.kind='F' and zhuanti.id=bginfo.zhuanti_id and bginfo.flag='Y'"; if (trim($sqlConditions)!="") {$sqlConditions=substr($sqlConditions,3);} $sqlOrders=" group by bginfo.zhuanti_id order by zhuanti.id desc"; $url="$PHP_SELF?$oriVARS"; //=== //返回第一条记录位置、总行数、当前页码和总页码 list($firstRow,$totleRows,$currentPage,$totalPages)= divpage($tablename,$sqlConditions,$totleRows,$pageSize,$goPage); //建立并执行查询语句 $strQuery="select $selcetFields from $tablename "; if (trim($sqlConditions)!=""){$strQuery.="where $sqlConditions ";} if (trim($sqlOrders)!=""){$strQuery.=" $sqlOrders";} $strQuery .=" limit $firstRow, $pageSize "; $db->query($strQuery); while ($db->next_record()){ list($name,$id,$zhuanti_id,$img_name,$img_pos,$bginfo,$title_id)=$db->Record; ?>

";}?>


$pageSize){divpage_link($url,$currentPage,$totalPages);} //建立分页连接显示?>
Query($strQuery); ?>