Technical Support:
Error page: /zero/content_list.php?channelid=1&cid=150Error infos: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') And reid=0 And channeltype='1'' at line 1
Error sql: Select id,typename,ispart From `dede_arctype` where ispart<>2 And id in(150,) And reid=0 And channeltype='1'
以下出现在“发布文档”中:
DedeCMS Error Warning!
Technical Support:
Error page: /dede/article_add.php
Error infos: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') And reid=0 And ispart<>2' at line 1
Error sql: Select id,typename,ispart,channeltype From `dede_arctype` where id in(1,) And reid=0 And ispart<>2
解决方法:
--修复“所有档案列表”和“我发布的文档” 中出现的Error方法:
首先找到 include/channelunit.func.php文件
修改第264行如下:
function GetSonIds($id,$channel=0,$addthis=true)
{
global $_Cs;
$GLOBALS['idArray'] = array();
if( !is_array($_Cs) )
{
require_once(DEDEROOT."/data/cache/inc_catalog_base.inc");
}
GetSonIdsLogic($id,$_Cs,$channel,$addthis);
$rquery = join(',',$GLOBALS['idArray']);
$rquery = preg_replace("/,$/", '', $rquery);
return $rquery;
}
再找到include/typelink.class.php文件
找到第245行 $admin_catalog = join(',', $admin_catalogs);
在后面加上下面这一行:
$admin_catalog = preg_replace("/,$/", '', $admin_catalog);
添加后并保存。
--修复“发布文章” 中出现的Error方法:
找到/dede/inc/inc_catalog_options.php文件
在第42行(注意是第42行,不是30行):$admin_catalog = join(',', $admin_catalogs);
在后面添加下面这一行:
$admin_catalog = preg_replace("/,$/", '', $admin_catalog);