25.12.2018, 12:16
Hello guys! As you can see in the title I need a little help with MySQL! I have a gang system with gang IDs. When I create the gang the gang ID's is the number of rows +1, but I have a little problem. When I try to delete the gang and if the gang id is 2 and gang id 3,4,5 and etc. exists there is a something like hole with number 2 and when I try again to create a gang it duplicate the last number, like I have 2 gangs with ID 5.
So I want when I delete the gang all of the numbers which are bigger than the ID of the gang I removed to get -1 value. I tried it, but it didn't work! Can you show me an example code please!
Thanks! +1 REP if you help me!
SORRY FOR BAD ENGLISH, I HOPE YOU UNDERSTOOD ME!
So I want when I delete the gang all of the numbers which are bigger than the ID of the gang I removed to get -1 value. I tried it, but it didn't work! Can you show me an example code please!
Thanks! +1 REP if you help me!
SORRY FOR BAD ENGLISH, I HOPE YOU UNDERSTOOD ME!