whiteboikyle Posted June 28, 2008 Share Posted June 28, 2008 Okay well i am making logs. Where it log's the person's ip who logs in. Well everytime they click Main.php it log's their ip. so when you go to view the logs it shows alot of that 1 user with the same ip.. What i want it to do is when you view the logs i want it to check and see if the user has the same ip. if not it will show both ip's. Like for example: whitey (username) 127.126.0.0 (IP) and it has multiple of those i just want it to display it once.. but if it has a different ip display both of those.. like for example: whitey 127.126.0.0 127.121.1.0 if you could just help me start this i can finish it. Thanks Quote Link to comment Share on other sites More sharing options...
Nhoj Posted June 28, 2008 Share Posted June 28, 2008 If you're using MySQL you could try using SELECT DISTINCT... http://www.wellho.net/mouth/279_Getting-a-list-of-unique-values-from-a-MySQL-column.html Something along those lines... Or simply not insert a log if the ip already exists. Quote Link to comment Share on other sites More sharing options...
whiteboikyle Posted June 28, 2008 Author Share Posted June 28, 2008 but i would have to do 2 distinctions no? 1 for username 1 for ip? 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.