A possible workaround is to include a column in your tables that
indicates whether the row has been "deleted" or not. Then, rather
than actually deleting the row, you update this column. Your
autoincrements should then work, and all you have to do is remember
to put "AND deleted = 'N'" in your queries.
Yeah, the tables would get bigger than they otherwise would. But
this would give you a unique row id.
--
derick
From: luke%quiknet.com@Internet on 04/25/99 12:39 PM
To: mysql%lists.mysql.com@Internet
cc: (bcc: Derick H Siddoway/TC/TRS/American Express)
Subject: rowid
I've been reading through the archives about rowid and work-arounds.
Most
of the work-arounds focus on unique identifiers. The code I am currently
working on requires that I have a loop which starts with the first row and
continues down the table until it has finished. The problem with a unique
identifier is that the table gets deletions regularly which makes it near
impossible to loop because of the inconsistant numbers. Any ideas would be
greatly appreciated.
Luke Hewitt
Tech Support Geek
QuikNet, Inc.
luke@stripped
916.782.9700 ext 113
M-Th 1pm-9pm, Sun 10am-6pm
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail mysql-thread2355@stripped
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail mysql-unsubscribe@stripped instead.