I have deleted my test chars over and over. when ever i need to test regestering from start etc..
but, how can i set the ID back to 0 (zero).
when i start a char again, it says: id 79. 80 etc.
mysql database. deleting..
Re: mysql database. deleting..
Code: Select all
ALTER TABLE `table` AUTO_INCREMENT =1
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: mysql database. deleting..
I was wondering that too! Thanks Chris! Is there a way to do that manually through phpMyAdmin as well?
Fight Cycle : My latest Browser game WIP
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: mysql database. deleting..
It has been a while since I have used phpMyAdmin, but I know there is a way to type SQL queries directly into the GUI and execute them. I don't think I have ever had to use it before, but it would come in handy to perform that command manually.Callan S. wrote:I was wondering that too! Thanks Chris! Is there a way to do that manually through phpMyAdmin as well?
The indelible lord of tl;dr
Re: mysql database. deleting..
Yes there is.
Select your table. Then choose the 'Operations' tab along the top. Should be the 8th tab.
Then under Table options put 'AUTO_INCREMENT' to whatever you want.
Select your table. Then choose the 'Operations' tab along the top. Should be the 8th tab.
Then under Table options put 'AUTO_INCREMENT' to whatever you want.
Fighting for peace is declaring war on war. If you want peace be peaceful.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: mysql database. deleting..
good info here
Re: mysql database. deleting..
Ah ha! Thanks Chris! Do you know what happens if you set it to a number already used? Does it overwrite the entry, or just keep looking until it finds an index that's empty? Just asking if you know, as I'd have to fiddle about alot (for me, atleast), to find out by experiment.
Fight Cycle : My latest Browser game WIP
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Driftwurld : My Browser Game WIP
Philosopher Gamer : My Blog
Re: mysql database. deleting..
I'm guessing it will throw an error. Not sure myself
.
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: mysql database. deleting..
hmm.. tried to delete (alter) the database manualy, but it doesnt work for me.
i put the auto increment to 1 (want the id to start from 1) and i press Go.
it loads up, and when its done it still shows the old id 86 (and rising).
I also tried to change it when i didnt have any characters in the table. still doesnt work / change for me.
any ideas ?
EDIT:
HMM, NOW it worked. weird.
i put the auto increment to 1 (want the id to start from 1) and i press Go.
it loads up, and when its done it still shows the old id 86 (and rising).
I also tried to change it when i didnt have any characters in the table. still doesnt work / change for me.
any ideas ?
EDIT:
HMM, NOW it worked. weird.