View Single Post
Old 12-16-2007, 03:05 AM   #3 (permalink)
Boogle
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 422
iTrader: 0 / 0%
Latest Blog:
None

Boogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the rough
Quote:
But you haven't done a good job describing your problem. What you really should do, is in your code to create a new row, have it check the table to see if there are any unused ids, and give the new row that id instead of the auto increment value.
I agree, you don't need to use auto_increment. You should make your own ID column and run a query that checks for the highest value within it then use

Code:
ID = HIGHEST VALUE + 1
That's the way i would do it. But why do these gaps in the ID matter anyway?Surely people aren't seeing your primary key/mainID ? You should be using a seperate reference ID for the clients to see?

Boog's
__________________
Great new 'June' Javascript Framework

June Forums - Innovative JScripting

Price is what you pay... Value is what you get.
Boogle is offline   Reply With Quote