Commit d6ffab1c by Jansa Jose

booking and ride history

parent 1e55138b
...@@ -1735,7 +1735,7 @@ function offer_history_ride($request){ ...@@ -1735,7 +1735,7 @@ function offer_history_ride($request){
$this->db->limit($start,$stop); $this->db->limit($start,$stop);
$this->db->order_by("id", "desc"); $this->db->order_by("id", "desc");
$this->db->where('ride.status!=',2); $this->db->where('ride.status!=',2);
$this->db->where('(ride.ride_status = 2 and ride.ride_status = 3 and ride.ride_status = 4 and ride.ride_status = 5)'); $this->db->where('(ride.ride_status = 2 or ride.ride_status = 3 or ride.ride_status = 4 or ride.ride_status = 5)');
$this->db->where('departure_date<',$date ); $this->db->where('departure_date<',$date );
$this->db->where('users_id',$request['user_id']); $this->db->where('users_id',$request['user_id']);
$this->db->select('ride.*,car_details.car_image'); $this->db->select('ride.*,car_details.car_image');
...@@ -1761,8 +1761,9 @@ function booking_ride_history($request){ ...@@ -1761,8 +1761,9 @@ function booking_ride_history($request){
$this->db->limit($start,$stop); $this->db->limit($start,$stop);
$this->db->order_by("booking.booking_date","desc"); $this->db->order_by("booking.booking_date","desc");
$this->db->order_by("booking.id","desc"); $this->db->order_by("booking.id","desc");
$this->db->where('ride.departure_date<',$date ); // $this->db->where('ride.departure_date<',$date );
$this->db->where('(booking.status = 2 and booking.status = 3 and booking.status = 4 and booking.status = 5)'); $this->db->where('(booking.status = 2 or booking.status = 3 or booking.status = 4 or booking.status = 5)');
$this->db->or_where('ride.departure_date<',$date );
$this->db->where('ride.status !=','2' ); $this->db->where('ride.status !=','2' );
$this->db->where('booking.user_id',$request['user_id']); $this->db->where('booking.user_id',$request['user_id']);
$this->db->select('DISTINCT(booking.id) as bookid,rating.rating,booking.ride_id,booking.departure_point,booking.drop_point,booking.amount,ride.detour_time,ride.departure_date,ride.users_id as owner,ride.reached_time'); $this->db->select('DISTINCT(booking.id) as bookid,rating.rating,booking.ride_id,booking.departure_point,booking.drop_point,booking.amount,ride.detour_time,ride.departure_date,ride.users_id as owner,ride.reached_time');
...@@ -1773,8 +1774,6 @@ function booking_ride_history($request){ ...@@ -1773,8 +1774,6 @@ function booking_ride_history($request){
$this->db->join('car_details','ride.car_id=car_details.user_id','left'); $this->db->join('car_details','ride.car_id=car_details.user_id','left');
$query= $this->db->get(); $query= $this->db->get();
// echo $this->db->last_query();
return $query->result(); return $query->result();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment