Ian-San Posted November 25, 2002 Posted November 25, 2002 I would like to regularly get rid of inactive customers who havent clicked for say 6 months. Sounds easy but .... Did anyone make a contribution on this or know the code?? Quote Ian-san Flawlessnet
Guest Posted November 25, 2002 Posted November 25, 2002 Does osc track/log when a customer logs in/out? If it does then you could just have some sort of counter for each customer or something.. and at the end of the counter(say 6months) it would delete "specific" records. You would not want to delete the customers buying records, but maybe just account or something. . .. . Good Idea... I think it would be very helpful for stores!! Quote
Ian-San Posted November 25, 2002 Author Posted November 25, 2002 OS records the date of last click but the customer data is spread across 3 files. When you add a customer to the database, it is obviously added at the end of the file. But when you delete, you need to store the customer ids of all deletions and perform on all 3 files. (or more if you add in orders, reviews etc). This makes the code a little more tricky - and risky! Quote Ian-san Flawlessnet
arames Posted November 25, 2002 Posted November 25, 2002 This would be among the MOST precious contributions.... Can't wait to have someone making it real... :? Quote
mattice Posted November 25, 2002 Posted November 25, 2002 Create a simple php file that selects all customer_id's from table customer_info where customers_info_date_of_last_logon = whatever time Then in the while loop delete the appropriate records in all the tables you want deleted.... Quote "Politics is the art of preventing people from taking part in affairs which properly concern them"
mattice Posted November 25, 2002 Posted November 25, 2002 customers_info_date_of_last_logon < whatever time that is :D Quote "Politics is the art of preventing people from taking part in affairs which properly concern them"
Ian-San Posted November 25, 2002 Author Posted November 25, 2002 customers_info_date_of_last_logon < whatever time that is/quote] I would like to use: < now()-6 months Any idea what format the 6 months should take? e.g is 6 months expressed in seconds, milli-seconds, as a real date etc etc?? Quote Ian-san Flawlessnet
Ian-San Posted November 25, 2002 Author Posted November 25, 2002 Cheers Burt Nightmare == challenge! I need this facility so I will take a look at it and see if I can come up with a contribution. Another problem might be that the date is stored in different formats depending on the country so the solution has to be general. If the date function can be solved, then the rest of it should be reasonably straightforward I think - maybe .... Quote Ian-san Flawlessnet
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.