网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   帝国Cms (https://www.0058.net/forumdisplay.php?f=72)
-   -   帝国cms判断如何调用不同栏目id的sql写法 (https://www.0058.net/showthread.php?t=5253)

East Greenville 2015-09-26 08:46 PM

帝国cms判断如何调用不同栏目id的sql写法
 
[e:loop={"select * from phome_ecms_shop where classid='$GLOBALS[navclassid]' order by newstime desc limit 5",5,24,0}]
这是调用当前栏目的
我想做的到是

如果判断当前栏目ID是5,则调用栏目ID是12的
如果判断当前栏目ID是6,则调用栏目ID是13的
等等。。。。

有没有这种SQL写法啊,谢谢啦

<?php
if($GLOBALS[navclassid]==5)
{
$cid=12;
}
elseif($GLOBALS[navclassid]==6)
{
$cid=13;
}
?>
[e:loop={$cid,显示条数,操作类型,只显示有标题图片}]
模板代码内容
[/e:loop]


All times are GMT +8. The time now is 05:46 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.