♥14steve14 Posted May 18, 2018 Author Share Posted May 18, 2018 I have been thinking about customers data that is stored in the database. If I have no reason to keep that data I should delete it, or at least that is how I interpret the rules. So looking at my customer database I have customers details that have never bought anything. Should I delete that data. I think I should. To delete this data I have found the following code that Gary @burt posted ages ago I think it was. I have tried it on my databsase and it produces a list of 500+ customers. Is there a way to modify the query that I am using to also check to see whether the customer is on my mailing list. SELECT customers_id, customers_firstname, customers_lastname, customers_email_address FROM customers WHERE customers_id NOT IN ( SELECT customers_id FROM orders ) If not I will have to go through each individual one to see. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.