Mysql question please help???

These are old archives. They are kept for historic purposes only.
Post Reply
T-rexke
Posts: 147
Joined: Sat Mar 18, 2006 4:37 pm

Mysql question please help???

Post by T-rexke »

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 :)
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Re: Mysql question please help???

Post by Jobe »

The best way to do it is using a package such as Denora to load the data into MySQL, and then you can either use phpDenora or your own PHP code to handle the MySQL data produced by Denora.
Your IP: Image
Your Country: Image
T-rexke
Posts: 147
Joined: Sat Mar 18, 2006 4:37 pm

Re: Mysql question please help???

Post by T-rexke »

okay thx im going to try it and post it if anything changes :)
T-rexke
Posts: 147
Joined: Sat Mar 18, 2006 4:37 pm

Re: Mysql question please help???

Post by T-rexke »

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 :)
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Re: Mysql question please help???

Post by Jobe »

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 :)
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:

SELECT ison.*, chan.channel, user.nick FROM ison, chan, user WHERE chan.channel = '#channel' AND ison.chanid = chan.chanid AND ison.nickid = user.nickid;

If you replace #channel in that query with a channel name, that query will return a list of records constructed of all fields from ison, the channel field from chan and the nick field from user and will ONLY include records which show you who is on the specified channel.

For example:

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>
At this point though the support has left the realms of UnrealIRCd and headed over to services so this thread should really move over there. :P
Your IP: Image
Your Country: Image
Post Reply