TP多条件查询实例
where条件查询,时间范围查询
$condition = [ ['type', 'IN', '1,2,3'], ['allocate_id', '=', 0], ['member_id', '=', 0], ['card_code', '>=', $start_code], ['card_code', '<=', $end_code], ];
$condition = [ ['member_id', '=', $member_id] ]; if($type) { $condition[] = ['type', '=', $type]; } if ($start_time) { $condition[] = ['active_time', '>=', $start_time]; } if ($end_time) { $condition[] = ['active_time', '<', $end_time]; } $list = $this->where($condition)->field($field)->select();
-----END
影子是一个会撒谎的精灵,它在虚空中流浪和等待被发现之间;在存在与不存在之间....