首页 > 数据库技术 > 详细

数据库(子查询)

时间:2015-03-05 16:12:06      阅读:311      评论:0      收藏:0      [点我收藏+]

where parent_id=0

 

 

select shop_price from`kangarooisland_database`.`ki_goods`where cat_id in( select cat_id from`kangarooisland_database`.`ki_category` where parent_id=0) and is_hot=1 order by goods_id desc LIMIT 4

 

 

 

//查询数据库得到热销商品的价格 shop_price
$hot_goods_list = ‘select shop_price from‘. $GLOBALS[‘ecs‘]->table(‘goods‘) .‘where cat_id in( select cat_id from‘
. $GLOBALS[‘ecs‘]->table(‘category‘) .‘ where parent_id=‘.$row[‘cat_id‘].‘) and is_hot=1 order by goods_id desc LIMIT 4‘;

数据库(子查询)

原文:http://www.cnblogs.com/xiaolang1/p/4315956.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!