[ic] Customer Housekeeping & IC 4.8.7 - Resend

Marty Tennison marty at sediva.com
Wed Mar 2 08:10:58 EST 2005

Mark Bryant wrote:
> Hi Everyone,
> This is an edited resend as my last post seems to have slipped through 
> the cracks.
> I'm trying to use IC to do a bit of housekeeping via the Admin UI.....


Hi Mark,

Here is an SQL statement (I think it will work with your version of 
Mysql) that will select all userdb records that are not found in the 
transaction table.  ie, they have not placed orders.

SELECT userdb.username from userdb LEFT JOIN transactions ON 
userdb.username=transactions.username WHERE transactions.code IS NULL

It would be risky to delete all records found by that statement since it 
does not take into account the time since the creation of the account. 
So if someone created an account 1 minute before that statement was run, 
it would find that account, and delete it, if a delete statement was used.

So probably filtering by mod_time in the userdb would be the way to find 
all userdb records that have been created more than X time ago and have 
not placed an order.

I may be wrong, but I think that if a customer has created an account 
but not placed an order, there will only be information in the userdb 
table therefore, all you need to do is delete one row in the userdb 
table and the customer is gone.

-  - -- ----  ---------------------------- --- -- -   -
Marty Tennison                     The Sediva Company
email: marty at sediva.com
web: www.sediva.com
phone: +1-866-473-3482
fax: +1-866-686-6719
-  -- --- --------------------------------------- --- --

More information about the interchange-users mailing list