Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Delete customers question + SQL


PVK

Recommended Posts

I have a lot of "customers"who just registered once and never ever logged in and therefore also did never purchase anything.

That is fine of course as they are free to do so, but i want to clean out the customer list as i think a lot of them are fake, or just eating up my sql database size.

 

Anyway, as i have found out that there are too many of these non-customers i was wondering how to do this using an sql command .

 

 

I now have this :

 

SELECT *

FROM `customers_info`

WHERE 1 AND `customers_info_number_of_logons` =0 AND `customers_info_date_account_created` < '2005-04-02 23:03:04' LIMIT 0 , 1000

 

 

Which would show me the customers who have registered more than 6 months ago and never logged in.

 

The only problem is when i delete these i am not sure if this will remove all info belonging to these customers or that perhaps i should link this info in the sql database with another field (I.E. customer ID) with some command .

 

 

 

Will the above command remove all info from all selected customers without leaving any traces to the deleted customers in the database ???

Link to comment
Share on other sites

Hi, i dont know for the sql command - but there is a contribution that clames to do this:

 

http://www.oscommerce.com/community/contri...,inactive+users

 

I havent tried it yet - but its maybe just what you are looking for - reading the description.

 

Kind Regards,

Tom

Even in this dark place, yes, I am afraid of my own shadow.

 

 

 

Contributions | KnowledgeBase | osCommerce 2.2 pdf

Link to comment
Share on other sites

Thank you Thom.

 

I know about this contribution and i also have it installed in our shop.

the problem is that it is fine for say 5 to 10 customers but, when deleting several hundreds it is a bit too much work using this method, so an SQL command would be the preferred choice.

 

ANyway, thanks for your effort though :thumbsup:

 

 

 

So anyone with any SQL knowledge, please help with this simple question please

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...