//==初始化分页变量================
$currentdate = date('Y-m-d', time());
$tablename="publish ";
$pageSize=1;
$goPage=$goPage;
$selcetFields="*";
$sqlConditions="and id=".$id;
if (trim($sqlConditions)!="") {$sqlConditions=substr($sqlConditions,3);}
$sqlOrders=" order by 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);
if ($db->num_rows()==0) {echo "Sorry,暂时符合条件的没有记录!"; die();}
$db->next_record();
list ($id,$m_id,$info_type,$pt,$pct,$title,$content,$validate,$company,$province,$city,$address,$code,$contact,
$tel,$fax,$email,$flag,$reg_time)=$db->Record;
$content=trim($content);
//===
?>
|
标题: |
|
类别: |
【 】 |
发布单位: |
|
发布日期: |
|
详细内容: |
|
联系人: |
|
联系地址: |
|
联系电话: |
|
传真: |
|
Email: |
|
以上信息均为中国家电在线会员发布,信息的真实性由发布单位负责。
|
|
今日最新供求信息 |
$currentdate = date('Y-m-d', time());
$strQuery="select id,title from publish where flag='Y' and validate>='$currentdate' order by id desc limit 0,5";
$db->query($strQuery);
while ($db->next_record()){
list($this_id,$this_title)=$db->Record;
echo "· $this_title ";
}?>
|
|
|