<?php 
class Payment_model extends CI_Model {
	public function _consruct(){
		parent::_construct();
 	}




// 	 function get_rides(){
// 		 $query = $this->db->get('ride');
// 		 echo $this->db->last_query();die();
// 		 $result = $query->result();
// 		 return $result;
//      }
     
     
      function get_rides(){

	 //	$query = $this->db->distinct()->select('ride_id'); 
	 	$query = $this->db->select('ride_id'); 
		 $query = $this->db->get('booking_approve');
	 // echo $this->db->last_query();die();
		 $result = $query->result();
		 return $result;
     }




     function view_popup_all($id){ 
		
		$query = $this->db->where('id', $id);
		//$query = $this->db->where('status',0);   
		$query = $this->db->get('booking');

		$result = $query->row();

		return $result;	    
     }


	  function get_completedbooking(){
	 	 $query = $this->db->where('status',3); 
		 $query = $this->db->get('booking');
		 $result = $query->result();
		 return $result;
     }



     function view_popup_completed($id){ 
		
		$query = $this->db->where('id', $id);
		$query = $this->db->where('status',3);   
		$query = $this->db->get('booking');

		$result = $query->row();

		return $result;	    
     }



     function get_cancelleddbooking(){
	 	 $query = $this->db->where('status',2); 
		 $query = $this->db->get('booking');
		 $result = $query->result();
		 return $result;
     }



     function view_popup_cancelled($id){ 
		
		$query = $this->db->where('id', $id);
		$query = $this->db->where('status',2);   
		$query = $this->db->get('booking');

		$result = $query->row();

		return $result;	    
     }




          function get_onprocessdbooking(){
	 	 $query = $this->db->where('status',4); 
		 $query = $this->db->get('booking');
		 $result = $query->result();
		 return $result;
     }



     function view_popup_onprocess($id){ 
		
		$query = $this->db->where('id', $id);
		$query = $this->db->where('status',4);   
		$query = $this->db->get('booking');

		$result = $query->row();

		return $result;	    
     }

     


}
?>