|
@@ -51,12 +51,15 @@ $hrefstr = "?keys=" . $keys;
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<?php
|
|
<?php
|
|
-$sqlStr = "SELECT id, cs_code, cs_from, cs_country, cs_type, cs_deal, cs_addtime, cs_tel, cs_email,
|
|
|
|
- cs_whatsapp, cs_wechat, cs_linkedin, cs_facebook, cs_alibaba, colortag, cs_note, cs_claimFrom
|
|
|
|
- FROM customer
|
|
|
|
- WHERE (cs_alibaba = '' AND (cs_code LIKE '%阿里%' OR cs_code LIKE '%1688%') AND cs_belong = " . $_SESSION['employee_id'] . ")
|
|
|
|
- OR (cs_from = 8 AND cs_wechat = '' AND cs_belong = " . $_SESSION['employee_id'] . ")
|
|
|
|
- ORDER BY colortag DESC, id DESC";
|
|
|
|
|
|
+$sqlStr = "SELECT c.id, c.cs_code, c.cs_from, c.cs_country, c.cs_type, c.cs_deal, c.cs_addtime,
|
|
|
|
+ c.colortag, c.cs_note, c.cs_claimFrom, cc.tel as cs_tel, cc.email as cs_email,
|
|
|
|
+ cc.whatsapp as cs_whatsapp, cc.wechat as cs_wechat, cc.linkedin as cs_linkedin,
|
|
|
|
+ cc.facebook as cs_facebook, cc.alibaba as cs_alibaba
|
|
|
|
+ FROM customer c
|
|
|
|
+ LEFT JOIN customer_contact cc ON c.id = cc.customer_id
|
|
|
|
+ WHERE (cc.alibaba = '' AND (c.cs_code LIKE '%阿里%' OR c.cs_code LIKE '%1688%') AND c.cs_belong = " . $_SESSION['employee_id'] . ")
|
|
|
|
+ OR (c.cs_from = 8 AND cc.wechat = '' AND c.cs_belong = " . $_SESSION['employee_id'] . ")
|
|
|
|
+ ORDER BY c.colortag DESC, c.id DESC";
|
|
|
|
|
|
$result = $conn->query($sqlStr);
|
|
$result = $conn->query($sqlStr);
|
|
|
|
|