热搜词
发表于 2011-9-6 09:15:13 | 显示全部楼层 |阅读模式
本帖最后由 灰儿 于 2011-9-6 10:59 编辑

不断更新,欢迎补充提问:
请将SQL中的brand_替换成相应的表前缀
LIMIT限制请在后台设置读取条数
注意:后台每提交一次数据调用设置,相应的javascript代码会改变,需要重新粘贴JS代码到相应的位置。

1、最新入驻通过审核的店铺
SELECT * FROM brand_shopitems WHERE grade>2 ORDER BY itemid DESC

2、最新发布的10个商品(商品标题)
SELECT * FROM brand_gooditems WHERE grade_s>2 AND grade>2 ORDER BY itemid DESC

3、最新发布的10个商品(显示所属店铺名称)
SELECT * FROM brand_gooditems g INNER JOIN brand_shopitems s WHERE g.grade_s>2 AND g.grade>2 ORDER BY g.itemid DESC

4、最新发布的10个消费券
SELECT * FROM brand_consumeitems WHERE grade_s>2 AND grade>2 ORDER BY itemid DESC

5、最新发布的10个相册
SELECT * FROM brand_albumitems WHERE grade_s>2 AND grade>2 ORDER BY itemid DESC


6、最新发布的10个公告
SELECT * FROM brand_noticeitems WHERE grade_s>2 AND grade>2 ORDER BY itemid DESC


7、最新发布的10个团购
SELECT * FROM brand_groupbuyitems WHERE grade_s>2 AND grade>2 ORDER BY itemid DESC

8、推荐品牌商家
SELECT * FROM brand_shopitems WHERE recommend = 1  ORDER BY dateline DESC


在discuz x的首页diy调用品牌空间数据的方法(附模板文件):
http://www.discuz.net/thread-1845619-1-1.html





全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-11-24 20:55 , Processed in 0.157821 second(s), 22 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team