Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: sql query question  (Read 2819 times)

0 Members and 1 Guest are viewing this topic.

luc

  • Anope User
  • Offline Offline
  • Posts: 3
sql query question
« on: January 08, 2014, 01:33:54 PM »

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
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 156
    • French Eggdrop community
Re: sql query question
« Reply #1 on: January 09, 2014, 07:49:09 AM »

Code: [Select]
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 ASCGives 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
Logged
I'm currently

luc

  • Anope User
  • Offline Offline
  • Posts: 3
Re: sql query question
« Reply #2 on: January 09, 2014, 06:12:35 PM »

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
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 156
    • French Eggdrop community
Re: sql query question
« Reply #3 on: January 10, 2014, 03:53:09 PM »

it's users/top/10
Logged
I'm currently
Pages: [1]   Go Up