我正在将三个表连接在一起,但是在其中一个表中没有任何信息,除非用户打开我们发送给他们的电子邮件
我目前正在使用这个 sql,但它似乎无法正常工作
SELECT email.senton, customer.*, count(tracker.viewed) as viewed
FROM email_sent AS email, customer_detail AS customer, email_tracker AS tracker
WHERE email.customer_id = customer.customer_id
AND customer.Email = tracker.emailaddress
AND customer.LeadOwnerId = '{$this->userid}'
这是因为 email_tracker 表中可能没有客户信息,除非客户打开了电子邮件