首页 > 运营 > 建站经验 > 正文

帝国CMS万能标签调用随机文章的方法(按表随机和按照本栏目随机)

2019-10-11 22:25:08
字体:
来源:转载
供稿:网友
按表随机调用:  [ecmsinfo]"select * from phome_ecms_news order by rand() desc limit 6 ",6,18,0,24,2,0[/ecmsinfo]
随机调用本栏目:[ecmsinfo]"select * from phome_ecms_news where classid='$GLOBALS[navclassid]' order by rand() desc limit 6",6,18,0,24,2,0[/ecmsinfo]
其中:news为表名,两个6表示调用的数量为6条,18表示标题取18个字符,第一个0表示不显示栏名名,随机调用的操作类型固定为24,2表示模板ID,第二个0标题图片不存在也调用
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表