Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24
  1. #21
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Send Email to Customers Question

    so you did this:

    SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM customers c LEFT JOIN orders o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL;

    in your myphpadmin and it returned nothing?
    Phil Rogers
    A problem shared is a problem solved.

  2. #22
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: Send Email to Customers Question

    Quote Originally Posted by philip937 View Post
    so you did this:

    SELECT DISTINCT c.customers_email_address as customers_email_address, c.customers_lastname as customers_lastname, c.customers_firstname as customers_firstname FROM customers c LEFT JOIN orders o ON c.customers_id=o.customers_id WHERE o.date_purchased IS NULL;

    in your myphpadmin and it returned nothing?

    That one returned data...

  3. #23
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Send Email to Customers Question

    so somehow I need the customers_info table joined to this query and then add the time span the the WHERE clause.
    Phil Rogers
    A problem shared is a problem solved.

  4. #24
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Send Email to Customers Question

    I HAVE IT WORKING :)

    this seems to do the trick:
    Select
    customers_info.customers_info_date_account_created,
    customers.customers_lastname,
    customers.customers_firstname,
    customers.customers_email_address
    From
    customers_info Inner Join
    customers On customers_info.customers_info_id = customers.customers_id
    left Join
    orders on orders.customers_id = customers.customers_id WHERE orders.date_purchased IS NULL AND
    customers_info.customers_info_date_account_created BETWEEN (NOW() - INTERVAL 14 DAY) AND (NOW() - INTERVAL 7 DAY);

    I thinnk you were getting no results on your previous suggesting is that you were selecting the order date. instead we are just narrowing results of the select where the is no order date.

    I have noticed on the default query is has something like this:
    select distinct c.customers_firstname as customers_firstname

    the as bit, is this so it renames the column and therefore when the code to send email runs it picks customers_firstname ?
    Phil Rogers
    A problem shared is a problem solved.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v139h Send email to all customers with header and footer question?
    By dustbowl in forum General Questions
    Replies: 2
    Last Post: 31 Jul 2012, 12:43 PM
  2. Send Email To Customers - linebreaks
    By dmagic in forum General Questions
    Replies: 0
    Last Post: 12 Mar 2011, 12:34 PM
  3. Send Email To Customers
    By FatGuyinAZ in forum General Questions
    Replies: 5
    Last Post: 1 Dec 2010, 03:09 AM
  4. Send scheduled email to customers???
    By hifipj in forum General Questions
    Replies: 2
    Last Post: 16 Oct 2007, 02:39 PM
  5. Cannot send customers email
    By bhfruitcakeco in forum General Questions
    Replies: 2
    Last Post: 21 Dec 2006, 09:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR