Codeigniter Mixed Mysql

demo1:
$select->where(‘new_order_type’, 0)->where(‘delivery_clerk_done_time’, 0)
->where(‘delivery_clerk_accept_time>’, 0)
->where(‘(delivery_clerk_done_time=0 and delivery_clerk_accept_time>0 and delivery_clerk_accept_time < ‘.$time.’)’)
->or_where(‘dispatch_degree’,5);

demo2:
$this->db->limit(5)->select(‘course.*’);
$this->db->from(‘dr_1_course course’);
$this->db->join(‘dr_1_course_flag course_flag’,’course.id = course_flag.id’,’left’);
$this->db->where("(course_flag.flag=1 and course.type_cate=’音频视频’ and course_flag.status=1 and course.public=’否’ and course.uids like ‘%#{$uid}#%’)");
$this->db->or_where("(course_flag.flag=1 and course.type_cate=’音频视频’ and course_flag.status=1 and course.public=’是’)");
$data = $this->db->get()->result_array();

Codeigniter Mixed Mysql

发表评论

电子邮件地址不会被公开。 必填项已用*标注

滚动到顶部