collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Online members in web page  (Read 1711 times)

0 Members and 1 Guest are viewing this topic.

Offline bl81

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Online members in web page
« on: June 08, 2010, 04:05:35 am »
Trying to display which members are online in webpage. Everything is set up, but it's showing members that are not online. What do I need to verify that someone is actually online, or does the bot take awhile to update this?

Code: [Select]
$sql = 'SELECT DISTINCT online.nickname, online.status_gc, whois.level, whois.class
FROM online, whois
WHERE online.status_gc = 1 AND online.nickname = whois.nickname
ORDER BY online.nickname ASC, whois.class ASC, whois.level DESC';

Thanks for any thoughts/suggestions.

Offline Slacklin

  • BeBot User
  • **
  • Posts: 52
  • Karma: +0/-0
  • My spoon is too big!
    • United Org Site
Re: Online members in web page
« Reply #1 on: June 08, 2010, 08:22:07 am »
This is the query that I use.

Code: [Select]
SELECT online.nickname, whois.profession, whois.level
FROM online, whois
WHERE online.status_gc = 1 AND online.nickname = whois.nickname
ORDER BY whois.profession ASC, whois.level DESC, online.nickname ASC

It works for me. Not sure why yours isn't updating.

I posted my entire online script at http://bebot.link/ao-0-6-support/online-query/msg12818/#msg12818

Offline bl81

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Online members in web page
« Reply #2 on: June 08, 2010, 05:27:45 pm »
Yeah, I used your code as the base for mine with some minor changes. Thank you.

I should clarify a bit, it's not showing all offline members, only a select few. Perhaps there's something up with these particular members as I am using your condition for checking online status which should work fine.

Anyone else ran across this?
« Last Edit: June 08, 2010, 05:29:19 pm by bl81 »

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Online members in web page
« Reply #3 on: June 08, 2010, 05:55:48 pm »
Sounds like you might have some entries in your online table from other bots.

You probably want to add  an WHERE botname  check or just clear the online table of any old data.
BeBot Founder and Fixer Kingpin

Offline bl81

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Online members in web page
« Reply #4 on: June 08, 2010, 07:57:45 pm »
Sounds like you might have some entries in your online table from other bots.

You probably want to add  an WHERE botname  check or just clear the online table of any old data.

You know, I think that's exactly right. Switched bot names, and deleted all the old_botname_tables but there's only one whois/online table.

Thanks a lot.

Edit: Was exactly the problem, thanks Khalem.
« Last Edit: June 08, 2010, 08:45:48 pm by bl81 »

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 764
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal