chaoswar4u Posted July 22, 2007 Posted July 22, 2007 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 Quote
Decepti0n Posted July 22, 2007 Posted July 22, 2007 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 Quote
chaoswar4u Posted July 22, 2007 Author Posted July 22, 2007 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. Quote
UCC Posted July 24, 2007 Posted July 24, 2007 Re: User ID Number Re Order ! I believe this code is posted in the mod forum. Quote
chaoswar4u Posted July 24, 2007 Author Posted July 24, 2007 Re: User ID Number Re Order ! Found the post UCC Thx. Quote
John99 Posted July 24, 2007 Posted July 24, 2007 Re: User ID Number Re Order ! Could you post the link in here ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.