Jump to content
MakeWebGames

New Users ID's | Fix = $$$ for you, need this bad


Gang-Life

Recommended Posts

I'm having a big problem & need your help, I drop all my users to be able to start from userid=1 but it keeps shooting back up to id=236

 

I've dropped almost every table in phpMyadmin but it still keeps counting from 237 :mad: It has made me wanna cry so I'm asking for help now

 

if($_REQUEST['ref']) {

$q=$db->query("SELECT * FROM users WHERE userid={$_REQUEST['ref']}");

$r=$db->fetch_row($q);

}

$zone=mt_rand(1,4);

$db->query("INSERT INTO users (username, login_name, userpass, level, money, bankmoney, zone, gold, donatordays, adminlawl, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, lastip, lastip_signup, display_pic, layout) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, 200, 2000, $zone, 0, 3, 1, 100, 100, 5, 5, 5, 5, 20, 20, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$IP', '$IP', 'images/noavatar.jpg', 4)");

$i=$db->insert_id();

$db->query("INSERT INTO userstats VALUES($i, 2, 2, 2, 2, 2)");

$db->query("INSERT INTO network_friends_top VALUES('', $i, 1, '', '', '', '', '', '', '')");

$db->query("INSERT INTO network_friends_approved VALUES('', $i, 1,UNIX_TIMESTAMP())");

$db->query("UPDATE users SET fightrank=$i WHERE userid=$i");

$pass = md5($_POST['password']);

if ($_REQUEST['ref'])

Edited by Gang-Life
Link to comment
Share on other sites

  1. Open PMA
  2. Click on the DB you're using
  3. Then on the `users` table
  4. Look on the top where it has all the control links
  5. Click "Operations" or something like that
  6. Look for something which says auto increment change it will have a number in it
  7. Change it to what you want

 

[ATTACH=CONFIG]1271[/ATTACH]

[ATTACH=CONFIG]1272[/ATTACH]

I emptied table, why does the ID still come out as that?

Because all you did was clear the data from the table, meaning you never changed the A_I value.

How should I clear a table and change A_I value?

In the future you should Truncate the table instead, that removes all the data and changes increment back to 1.

[ATTACH=CONFIG]1273[/ATTACH]

SS2.thumb.png.92aa6533fdcba9d71a5aef725a187481.png

SS3.thumb.png.96fac55eeb7aee12dbd0ef419e278c70.png

SS4.thumb.png.9cf77b960f5595566fce8d10585a80ce.png

Edited by Script47
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...