Denora Stats (discontinued) > Denora 1.5.x Support (Read Only)
Help with table from phpdenora database.
(1/1)
DavY:
Hello everybody,
I have a question. I have some time trying to figure out from the table and get kolumn reached in which channel a user is. I would like to know how database is selected in which channel a user is. If anyone can help me here, Thank you very much! Sorry for my bad english.. I'm from the netherlands.
Best regards.
Hal9000:
I didn't understand a word, but i suppose you mean the ison table
DavY:
--- Quote from: Hal9000 on May 09, 2012, 08:06:20 AM ---I didn't understand a word, but i suppose you mean the ison table
--- End quote ---
Sorry for my confusion. I will try to explain better in english. I am currently working on its own php to write, so I put it on a profile page of a member may indicate in which channel it is online, but I just do not know what table and kolumn of DeNora database that is. It would be easier if I knew. this is so because I want to know which database DeNora cites in which channel a user is online. I hope this is somewhat clearer and you can help me with this.
Jobe:
To get a list of channels a user is on, whether the channel has +p or +s, and what that users status is on each channel using their nick you would use this query:
--- Code: ---SELECT chan.channel, chan.mode_lp, chan.mode_ls, ison.* FROM chan, ison, user WHERE ison.chanid = chan.chanid AND ison.nickid = user.nickid AND user.nick = '<nick>' ORDER BY chan.channel;
--- End code ---
If you know the nickid (eg you have already retrieved it) you can shorten that to:
--- Code: ---SELECT chan.channel, chan.mode_lp, chan.mode_ls, ison.* FROM chan, ison WHERE ison.chanid = chan.chanid AND ison.nickid = <nickid> ORDER BY chan.channel;
--- End code ---
DavY:
--- Quote from: Jobe on May 09, 2012, 01:15:44 PM ---To get a list of channels a user is on, whether the channel has +p or +s, and what that users status is on each channel using their nick you would use this query:
--- Code: ---SELECT chan.channel, chan.mode_lp, chan.mode_ls, ison.* FROM chan, ison, user WHERE ison.chanid = chan.chanid AND ison.nickid = user.nickid AND user.nick = '<nick>' ORDER BY chan.channel;
--- End code ---
If you know the nickid (eg you have already retrieved it) you can shorten that to:
--- Code: ---SELECT chan.channel, chan.mode_lp, chan.mode_ls, ison.* FROM chan, ison WHERE ison.chanid = chan.chanid AND ison.nickid = <nickid> ORDER BY chan.channel;
--- End code ---
--- End quote ---
Perfect! Thanks for your help Jobe.. That was what i wanted.
Navigation
[0] Message Index
Go to full version