Jump to content
MakeWebGames

User ID Number Re Order !


Recommended Posts

Guest chaoswar4u
Posted

I wish to make it that when new users register they will be given the ID number next in order. What I mean by this is that when you have had a game running for a while and you decide to remove inactive accounts you will be left with gaps all over regarding the ID order. To combat this I require the register.php to search for such gaps and replace them when new users register. Ive had input from a user already but such a task like this I havent a clue where to start. I really be greatful if anyone can help with this matter. Thx

Posted

Re: User ID Number Re Order !

 

<?php
$e = mysql_query('select `userid` from `users` order by `userid` desc limit 1');
$a = mysql_fetch_array($e);

$the_next_userid_you_should_insert = $a[0] + 1;
?>

 

I think

Guest chaoswar4u
Posted

Re: User ID Number Re Order !

Thx for the reply Decepti0n but where would this go? I assume it would be register.php but where. This is just way out for me at the moment.

Guest chaoswar4u
Posted

Re: User ID Number Re Order !

Found the post UCC Thx.

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...