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.
Bookmarks