Commit e692aff2 by Jansa Jose

Merge branch 'master' into 'dev_production'

Master See merge request !42
parents acf78f4d 2dd8863e
...@@ -8,6 +8,7 @@ class Driver_model extends CI_Model { ...@@ -8,6 +8,7 @@ class Driver_model extends CI_Model {
$query = $this->db->where('booking_approve.status',1); $query = $this->db->where('booking_approve.status',1);
$query=$this->db->where('driver_id !=', 'NULL'); $query=$this->db->where('driver_id !=', 'NULL');
$query=$this->db->where('users.status', '1');
$this->db->join('users','users.id = booking_approve.driver_id'); $this->db->join('users','users.id = booking_approve.driver_id');
$query = $this->db->distinct()->select("booking_approve.driver_id,TRIM(concat(users.first_name,' ',IFNULL(users.last_name,''))) as driver_name,users.email,users.gender,users.date_of_birth"); $query = $this->db->distinct()->select("booking_approve.driver_id,TRIM(concat(users.first_name,' ',IFNULL(users.last_name,''))) as driver_name,users.email,users.gender,users.date_of_birth");
$query = $this->db->get('booking_approve'); $query = $this->db->get('booking_approve');
......
...@@ -108,9 +108,9 @@ class Webservice_model extends CI_Model{ ...@@ -108,9 +108,9 @@ class Webservice_model extends CI_Model{
public function user_reg($data){ public function user_reg($data){
$num = $this->db->where('username',$data['username'])->get('users')->num_rows(); $num = $this->db->where(array('username'=>$data['username'],'status'=>'1'))->get('users')->num_rows();
$num1 = $this->db->where('email',$data['email'])->get('users')->num_rows(); $num1 = $this->db->where(array('email',$data['email'],'status'=>'1'))->get('users')->num_rows();
$num2 = $this->db->where('phone_no',$data['phone_no'])->get('users')->num_rows(); $num2 = $this->db->where(array('phone_no',$data['phone_no'],'status'=>'1'))->get('users')->num_rows();
if($num>0){ if($num>0){
$result = array('status'=>'error','message'=>'username Already Exists'); $result = array('status'=>'error','message'=>'username Already Exists');
......
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