Commit 99a87bee by Tobin

dc

parent 77ddaff7
...@@ -1831,8 +1831,7 @@ class Webservice_model extends CI_Model { ...@@ -1831,8 +1831,7 @@ class Webservice_model extends CI_Model {
CUST.profile_image_qr,CHT.type AS friend_status CUST.profile_image_qr,CHT.type AS friend_status
FROM customer AS CUST FROM customer AS CUST
LEFT JOIN chats AS CHT ON ((CUST.customer_id=CHT.from_user OR CUST.customer_id=CHT.to_user) AND CHT.type=1) LEFT JOIN chats AS CHT ON ((CUST.customer_id=CHT.from_user OR CUST.customer_id=CHT.to_user) AND CHT.type=1)
WHERE ($phNumbers) AND CUST.enable_chat='1' AND
WHERE ($phNumbers) AND
customer_id NOT IN (SELECT from_user FROM chats WHERE (from_user=$user_id AND type='2') OR (to_user =$user_id AND type='2')) AND customer_id NOT IN (SELECT from_user FROM chats WHERE (from_user=$user_id AND type='2') OR (to_user =$user_id AND type='2')) AND
customer_id NOT IN (SELECT to_user FROM chats WHERE (from_user=$user_id AND type='2') OR (to_user =$user_id AND type='2')) customer_id NOT IN (SELECT to_user FROM chats WHERE (from_user=$user_id AND type='2') OR (to_user =$user_id AND type='2'))
GROUP BY CUST.customer_id"); GROUP BY CUST.customer_id");
...@@ -1904,7 +1903,8 @@ class Webservice_model extends CI_Model { ...@@ -1904,7 +1903,8 @@ class Webservice_model extends CI_Model {
$sql = "SELECT CUST.name,CUST.phone,CUST.profile_image,CUST.profile_image_qr, $sql = "SELECT CUST.name,CUST.phone,CUST.profile_image,CUST.profile_image_qr,
CUST.customer_id,CUST.fcm_token CUST.customer_id,CUST.fcm_token
FROM customer AS CUST FROM customer AS CUST
WHERE CUST.customer_id='$fromUsrId' GROUP BY CUST.customer_id"; WHERE CUST.customer_id='$fromUsrId' AND CUST.enable_chat='1'
GROUP BY CUST.customer_id";
$cust = $this->db->query($sql); $cust = $this->db->query($sql);
if(!empty($cust) && !empty($cust = $cust->row_array())){ if(!empty($cust) && !empty($cust = $cust->row_array())){
$custData[] = $cust; $custData[] = $cust;
......
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