List:General Discussion« Previous MessageNext Message »
From:saf Date:March 23 2006 4:21pm
Subject:Re: Question about autoincrement ID
View as plain text  
On Thu, Mar 23, 2006 at 04:17:44PM +0000, Alec.Cawley@stripped wrote:
> Lots of ways round this. Instead of deleting records, add a boolean
> "deleted" flag. All selects then need to add "and deleted = 0". But you can
> find a (random) deleted row with "select id from table where deleted = 1
> limit 1". If this returns a result, use update to re-populate that record,
> clearing the deleted flag. If it returns nothing, use insert to create a
> new record.

Great idea!!
Many thanks!!!

-- 
Best regards,
saf
http://Trashmail.net/


Attachment: [application/pgp-signature] Digital signature signature.asc
Thread
Question about autoincrement ID(saf)23 Mar
  • Re: Question about autoincrement IDSGreen23 Mar
    • Re: Question about autoincrement ID(saf)23 Mar
      • Re: Question about autoincrement IDAlec.Cawley23 Mar
      • Re: Question about autoincrement IDSGreen23 Mar
        • Re: Question about autoincrement IDmysql23 Mar
  • Re: Question about autoincrement IDMartijn Tonies23 Mar
Re: Question about autoincrement ID(saf)23 Mar