thinkphp数据库查询条件数组形式

$group_by_where = array(

'gb.start_time'=>array('lt',time()),

'gb.end_time'=>array('gt',time()),

'g.is_on_sale'=>1,

'gb.is_end' =>0,

);

$GroupBuy = new GroupBuy();

    $count = $GroupBuy->alias('gb')->join('__GOODS__ g', 'g.goods_id = gb.goods_id')->where($group_by_where)->count();

猜你喜欢

转载自blog.csdn.net/lmp5023/article/details/88554160