dedecms发布分页问题完全解决方案(3)_DedeCms教程
$body = addslashes($body);
$dsql->ExecuteNoneQuery("Update $table set $field='$body' where aid='$aid' ; ");
}
}
}//end if limit
替换为:
/----------------------------
//更新自动分页
//----------------------------
if($dojob=='page'){
require_once(dirname(__FILE__)."/inc/inc_archives_functions.php");
//统计记录总数
if($totalnum==0){
$addquery = " where aID>0 ";
if($sid!=0) $addquery .= " And aID>='$sid' ";
if($eid!=0) $addquery .= " And aID<='$eid' ";
$row = $dsql->GetOne("Select count(*) as dd From $table $addquery");
$totalnum = $row['dd'];
}
//获取记录,并分析
if($totalnum > $startdd+$pagesize) $limitSql = " limit $startdd,$pagesize";
else if(($totalnum-$startdd)>0) $limitSql = " limit $startdd,".($totalnum - $startdd);
else $limitSql = "";
$tjnum = $startdd;
if($limitSql!=""){
$addquery = " where aID>0 ";
if($sid!=0) $addquery .= " And aID>='$sid' ";
if($eid!=0) $addquery .= " And aID<='$eid' ";
$fquery = "Select aid,$field From $table $addquery $limitSql ;";
$dsql->SetQuery($fquery);
$dsql->Execute();
while($row=$dsql->GetArray())
{
$tjnum++;
$body = $row[$field];
$aid = $row['aid'];
if(strlen($body) < $msize) continue;
if(!preg_match("/
- Dedecms生成百度地图图文教程
- 织梦dedecms生成下拉式友情链接列表
- DEDECMS使用拼音首字母做栏目名称
- 织梦DEDECMS站群增强版 DedeCMS搭建站群首选
- DedeCMS Error:Tag disabled:php错误的完整处理方法
- dedecms编码转换方法 gbk转UTF-8,UTF-8转GBK
- 防XSS,sql注射,代码执行,文件包含的通用代码
- DedeCms教程:优化DedeCMS搜索结果
- DedeCms教程:Linux+Apache+PHP+MySQL服务器环境(CentOS篇)
- DedeCms教程:LuManager服务器管理软件安装DEDECMS软件
- DedeCms教程:Ubuntu/Debian上安装 PHP 5.3, Nginx 和 PHP-fpm
- DedeCms教程:windows server 2003 php 环境搭建