$goods = D('Goods');
// 获得总条数价格大于1000的商品
$cnt = $goods -> where ('price > 1000') -> count(); sum() 总数 max() avg() 平均数 min()
// 转为sql语句就是 SELECT COUNT(*) AS tp_count FROM 'sw_goods' LIMIT 1
$goods = D('Goods');
// 获得总条数价格大于1000的商品
$cnt = $goods -> where ('price > 1000') -> count(); sum() 总数 max() avg() 平均数 min()
// 转为sql语句就是 SELECT COUNT(*) AS tp_count FROM 'sw_goods' LIMIT 1