Mysql ID Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Mysql ID Problem (
/showthread.php?tid=240302)
Mysql ID Problem -
Sascha - 15.03.2011
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)
Re: Mysql ID Problem -
WackoX - 15.03.2011
Add this behind the query:
Re: Mysql ID Problem -
Sascha - 15.03.2011
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)
Re: Mysql ID Problem -
Sascha - 16.03.2011
anyone else?
Re: Mysql ID Problem -
WackoX - 16.03.2011
Then disable auto increment.
Re: Mysql ID Problem -
Sascha - 16.03.2011
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...