Mysql ID Problem
#1

Hi..
I'm not sure whether this is the right section here, however it has something to do with my server script, so I'll just ask here...
My server is using a mysql db and for a house system I'm saving coords in it..
the houses are based on the "id" by the mysql db, which is set to auto increment..
now I've saved 1 house wrong and needed to delete it... however it now continues saving above it.. so I have ID 49 and ID 52 as next id.. how can I make it start counting from 49?
So I would remove ID 52 now and would like it to add the next id as "50"...(it will add 53 at the current state)
Reply
#2

Add this behind the query:
Код:
ORDER BY id ASC
Reply
#3

when the id is set to "auto increment" I doubt that "INSER INTO `tabel` (blablalba) VALUES (blalalal) ORDER BY id ASC" will change anything..
ASC is senseless for "INSERT INTO" and doesn't solve my id problem (as far as I know)
Reply
#4

anyone else?
Reply
#5

Then disable auto increment.
Reply
#6

then I'd need to change my script, which I actually wanted to denie.. I'm sure that it is possible somehow to make the auto increment count from that number...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)