第二次提交
This commit is contained in:
@@ -30,6 +30,7 @@ class Index extends Base {
|
||||
$sql = "select a.goods_name,a.goods_id,a.shop_price,a.market_price,a.cat_id,b.parent_id_path,b.name from ".C('database.prefix')."goods as a left join ";
|
||||
$sql .= C('database.prefix')."goods_category as b on a.cat_id=b.id where a.is_hot=1 and a.is_on_sale=1 order by a.sort";//二级分类下热卖商品
|
||||
$index_hot_goods = S('index_hot_goods');
|
||||
//如果缓存没有index_hot_goods那么用$sql数据库查询首页也买商品
|
||||
if(empty($index_hot_goods))
|
||||
{
|
||||
$index_hot_goods = Db::query($sql);//首页热卖商品
|
||||
|
Reference in New Issue
Block a user