[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BillMax questions -- SQL Question About BillMax 2.0.4 - Deleting Users & Services
Brian,
Safest thing to do is to use the "billmax-admin delete -f -u X" command where X
is the user number to delete. You could run the query for user.state=1 and
user.fname='mailbox' to get a list of users numbers to delete.
Something like:
select "/usr/local/billmax/bin/billmax-admin delete -f -u ", number from user
where state=1 and fname='mailbox'
should produce the necessary commands to delete the users and *all* the
associated data.
Do a backup before, just in case. :)
Bill
Brian Wallace wrote:
> Hi,
>
> We've recently upgraded from 1.5.4 to 2.0.4. Everything seems to be
> working fine. My boss wants me to clean up a lot of the old data. We
> have a ton of old users and services which are cancelled. The first type
> of user and service I need to delete is an email account that we never
> charged for.
>
> Do to how we had to import the data from our old billing system we have
> 1000's of cancelled users whose first name is listed as 'mailbox'.
>
> My first question is this: Will the following SQL command delete all
> closed users whose firstname is 'mailbox' and any services associated
> with those users?
>
> delete from users, services where (user.state=1 and user.fname='mailbox'
> and user.number = services.user)
>
> Next question: Is this all I need to do to delete these users and
> services, or am I missing something? These were always free services,
> but do I need to delete anything from the payhist table as well.
>
> Thanks for your time and have a great day!
>
> Brian Wallace
> Coastal Web Online
>
> -----------------------------------------------------------------------------
> To unsubscribe from the "BillMax Questions" mailing list, please
> send a message to "majordomo@billmax.com" with "unsubscribe questions"
> in the message body. The message must be sent from the exact email
> address on the list.
--
Bill Schoolfield
The iSpark Group, Inc. / BillMax Billing Solutions
P.O. Box 1569
Fort Worth TX 76104
817.429.4440 (Phone)
817.348.8461 (Fax)
-----------------------------------------------------------------------------
To unsubscribe from the "BillMax Questions" mailing list, please
send a message to "majordomo@billmax.com" with "unsubscribe questions"
in the message body. The message must be sent from the exact email
address on the list.