MagIRC > MagIRC Support

sql query question

(1/1)

luc:
Hello,

can please someone give me an example to make an sql query to output for example all users in a channel? lets say #test

Thanks

CrazyCat:

--- Code: ---SELECT u.nick, u.realname, u.connecttime, u.away, u.awaymsg, i.mode_lh, i.mode_lo, i.mode_lv FROM (user u LEFT JOIN (ison i LEFT JOIN chan c ON i.chanid=c.chanid) ON u.nickid=i.nickid) WHERE channel='#test' ORDER BY i.mode_lo ASC, i.mode_lh ASC, i.mode_lv ASC, u.connecttime ASC
--- End code ---
Gives you complete informations about users on a channel. I use it on http://www.zeolia.net/canaux/zeolia.html.

You can also use the rest API

luc:
thanks crazycat


can you tell me as well the sql for the 'toptalkers' in all the network i c'ant find it in the api

CrazyCat:
it's users/top/10

Navigation

[0] Message Index

Go to full version