webtuto Posted June 20, 2009 Share Posted June 20, 2009 hey , im using a query like this $rand = "select * from online where ip='$ip' order by id"; i want it to choose IP adresses , but IGNORE mine any ideas ! thanks in advance Link to comment https://forums.phpfreaks.com/topic/163009-exception-while-using-queries-in-php/ Share on other sites More sharing options...
asmith Posted June 20, 2009 Share Posted June 20, 2009 Ignore your ip? or ignore the user which is running the script? If your ip is x.x.x.x : $rand = "select * from online where ip='$ip' AND ip != 'x.x.x.x' order by id"; If you don't' want it show the user ip : $rand = "select * from online where ip='$ip' AND ip != '".$_SERVER['remote_addr']."' order by id"; Link to comment https://forums.phpfreaks.com/topic/163009-exception-while-using-queries-in-php/#findComment-860096 Share on other sites More sharing options...
webtuto Posted June 20, 2009 Author Share Posted June 20, 2009 thanks its working its easy but i just woke up lol sorry Link to comment https://forums.phpfreaks.com/topic/163009-exception-while-using-queries-in-php/#findComment-860101 Share on other sites More sharing options...
asmith Posted June 20, 2009 Share Posted June 20, 2009 Please use the "topic solved" button If the topic is entirely solved. Link to comment https://forums.phpfreaks.com/topic/163009-exception-while-using-queries-in-php/#findComment-860102 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.