PHPOK前台分类调用顺序调整
作者:我就是个世界
发表于:2009-05-27
PHPOK2.2前台分类调用顺序默认是ASC升序排序,如何调整为降序,需要找到该标签调用函数。
[code]<!-- $left_catelist AS $key=>$value -->[/code]
修改list.php第41行SQL查询语句的WHERE条件
[code]$sql = "SELECT id,sysgroupid,rootid,parentid,catename,catestyle FROM ".$prefix."category WHERE status='1' AND (rootid='".$sqlid."' OR id='".$sqlid."' OR parentid='".$sqlid."') ORDER BY taxis ASC,id DESC";[/code]
修改为:
[code]$sql = "SELECT id,sysgroupid,rootid,parentid,catename,catestyle FROM ".$prefix."category WHERE status='1' AND (rootid='".$sqlid."' OR id='".$sqlid."' OR parentid='".$sqlid."') ORDER BY taxis ASC,id ASC";[/code]
即可。
[code]<!-- $left_catelist AS $key=>$value -->[/code]
修改list.php第41行SQL查询语句的WHERE条件
[code]$sql = "SELECT id,sysgroupid,rootid,parentid,catename,catestyle FROM ".$prefix."category WHERE status='1' AND (rootid='".$sqlid."' OR id='".$sqlid."' OR parentid='".$sqlid."') ORDER BY taxis ASC,id DESC";[/code]
修改为:
[code]$sql = "SELECT id,sysgroupid,rootid,parentid,catename,catestyle FROM ".$prefix."category WHERE status='1' AND (rootid='".$sqlid."' OR id='".$sqlid."' OR parentid='".$sqlid."') ORDER BY taxis ASC,id ASC";[/code]
即可。
请发表您的评论