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... Quote Link to comment 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') 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.