Be careful no other tables link back to the invoice table.  When you 
delete a row from a table and then add new ones, it doesn't 
remember the auto_increment value it left off at, it's going to take 
the max value there and add one.  So if you still have records 
referring back to the invoice, when a new invoice is added, the 
records will be incorrectly pointing to the new invoice.

Am I making sense?

BTW this is just an observation I have made through testing, I have 
not yet looked in the official mysql documentation to verify.

On 10 Sep 2000, at 0:07, Bjarne Hansen wrote:

> Hi!
> 
> I need to clean up the database for old invoices.
> 
> As far as I can tell, This means deleting all records in these tables:
> 
> billing
> adress
> invoice
> 
> I belive these can but would not need to have all records deleted?
> 
> invoice status 
> shipping
> 
> Also I would expect all users and there adresses to be preserved as this is all 
>originaly in the user table?
> 
> 
> Am I missing something?
> 
> Bjarne
> 
> 
> 
> ------------------------------------------------------------
> To subscribe:    [EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Site:            http://www.working-dogs.com/freetrade/
> Problems?:       [EMAIL PROTECTED]




------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Site:            http://www.working-dogs.com/freetrade/
Problems?:       [EMAIL PROTECTED]

Reply via email to