Mysql question please help???
Posted: Wed Sep 23, 2009 12:36 pm
heey i just wondering is it possible to show the current users of a channel on a website? using mysql? if so how to do it then
thx for the help
thx for the help
Welcome to the UnrealIRCd Forums!
https://forums.unrealircd.org/
I'm not sure where you think it doesnt show user nick names BUT in the MySQL tables, you have a chan table, a user table and an ison table. All 3 are relevent to who is on a channel. the ison table contains a channel id NUMBER and a user id NUMBER, both of which are associated with the relevent values in the user and the channel tables. You will then need to use SQL queries which will get the data from multiple tables to get who is on a channel:T-rexke wrote:one more thing i se now that denora doesnt show user nicknames?
is it possible to let them show on on the website or not does anyone now that? thx in advance
Code: Select all
mysql> SELECT ison.*, chan.channel, user.nick FROM ison, chan, user WHERE chan.channel = '#jobe' AND ison.chanid = chan.chanid AND ison.nickid = user.nickid;
+--------+--------+---------+---------+---------+---------+---------+---------+---------+--------+
| nickid | chanid | mode_la | mode_lg | mode_lh | mode_lo | mode_lq | mode_lv | channel | nick |
+--------+--------+---------+---------+---------+---------+---------+---------+---------+--------+
| 3 | 21 | N | N | Y | Y | N | N | #jobe | Jobe |
| 5 | 21 | N | N | N | N | N | N | #jobe | Boris |
| 11 | 21 | N | N | N | Y | N | N | #jobe | CServe |
| 102 | 21 | N | N | N | N | N | N | #jobe | Vadtec |
| 101 | 21 | N | N | N | Y | N | N | #jobe | Tidus |
+--------+--------+---------+---------+---------+---------+---------+---------+---------+--------+
5 rows in set (0.00 sec)
mysql>