
If you want to reseed your primary key (i.e. change the value of the next primary key generated), use this handy MySQL function:
{code type=php} ALTER TABLE table_name AUTO_INCREMENT = 59446; {/code}
This is useful for when you are starting a new site and you want to disguise that fact. For example, if you sign up a new user and their user_id is 14 it is a giveaway that there are only a maximum of 13 other users.
{ 2 comments… read them below or add one }
Yeh, but the most of the readers are using phpMyAdmin.. and they could just click “Operations” -tab .. and set the AUTO_INCREMENT -value.
Good advice, I am personally not a fan of phpMyAdmin. Much prefer to do as much as I can in pure sql.