文章介绍了dedecms自定义模型独立表全局调用方法标签:arclistsg|独立单表模型列表修改方法,有需要的朋友可参考一下。
首先修正官方版的一个bug。/include/taglib/arclistsg.lib.php第76行,代码如下:
- if(!emptyempty($channelid)) $gquery = "SELECT addtable,listfields FROM `#@__channeltype` WHERE id='$channelid' ";
- else $gquery = "SELECT ch.addtable,listfields FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE id='$typeid'"; //Vevb.com
- //更改为如下代码:
- if(!emptyempty($channelid)) $gquery = "SELECT addtable,listfields FROM `#@__channeltype` WHERE id='$channelid' ";
- else $gquery = "SELECT ch.addtable,listfields FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$typeid'";
新闻热点
疑难解答