Monk3h Posted January 31, 2009 Share Posted January 31, 2009 I am trying to create an multi checking script for my game. What i need to do is check the field IP in my players table and if the sql brings back multiple players with the same IP (2 or more) i would like to be alerted. How would do i do the SQL part to this? Quote Link to comment Share on other sites More sharing options...
Snart Posted January 31, 2009 Share Posted January 31, 2009 $result = mysql_query("SELECT `username` FROM `users` where `ip` = '".$whatever."';") if(mysql_num_rows($result) > 1) { echo 'Someone has been naughty.'; } Quote Link to comment Share on other sites More sharing options...
Monk3h Posted January 31, 2009 Author Share Posted January 31, 2009 <?php $IPsel = mysql_query("select * from players WHERE 'IP' = 'IP'"); while ($multi = mysql_fetch_array($IPsel)) { Print "$multi[user] ($multi[id])<br><br>"; } ?> something like that, but I want it to check for players with the same IP. that just lists all the players where there IP = there IP which is all of them ofc.. =/ Quote Link to comment Share on other sites More sharing options...
Monk3h Posted February 1, 2009 Author Share Posted February 1, 2009 bump Quote Link to comment Share on other sites More sharing options...
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.