diff --git a/application/models/Webservice_model.php b/application/models/Webservice_model.php index 4bdb40f..e3e2f48 100644 --- a/application/models/Webservice_model.php +++ b/application/models/Webservice_model.php @@ -1896,8 +1896,12 @@ class Webservice_model extends CI_Model { } else { continue; } - $this->db->select("name,phone,profile_image,profile_image_qr,customer_id"); - $cust = $this->db->get_where('customer',array('customer_id'=>$fromUsrId)); + $sql = "SELECT CUST.name,CUST.phone,CUST.profile_image,CUST.profile_image_qr, + CUST.customer_id,CAUTH.auth_token AS fcm_token + FROM customer AS CUST + INNER JOIN customer_auth AS CAUTH ON (CAUTH.user_id=CUST.customer_id) + WHERE CUST.customer_id='2'"; + $cust = $this->db->query($sql); if(!empty($cust) && !empty($cust = $cust->row_array())){ $custData[] = $cust; }