Kingy Posted February 24, 2008 Share Posted February 24, 2008 With my php irc bot im trying to make something that will see which users in my mysql database are connected to the irc server. i find which users are connected to the server simply by going fputs($conn,"OPERSERV userlist\r\n"); and it then $data shows me: :OperServ!services NOTICE IrcBOT : User1 :OperServ!services NOTICE IrcBOT : User2 :OperServ!services NOTICE IrcBOT : User3 I'm not entirely sure how to do this, but i would like to make a function that would then take User1, User2, User3 compare either of those names with the ones i SELECT out of the database of its a match then that user is online. really how would i go about this. Could i put the users into an array or something... Link to comment https://forums.phpfreaks.com/topic/92781-users-online/ Share on other sites More sharing options...
teng84 Posted February 24, 2008 Share Posted February 24, 2008 if selecting in the db you will only need the IN clause eg... select * from table where names IN ('user1','user2','user3') Link to comment https://forums.phpfreaks.com/topic/92781-users-online/#findComment-475394 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.