• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Gesior AAC] Who is online fix for TFS 1.0

Danger II

tibiara.com
Joined
Nov 21, 2012
Messages
1,716
Solutions
13
Reaction score
646
Location
Germany
Greetings,
since TFS 1.0 we dont have the column "online" in players table anymore, we have "players_online" table with players_id column in SQL instead..

Just one line have to be edited, a small change, which will let your whoisonline.php work well again...

in whoisonline.php search for:
PHP:
$q = 'SELECT * FROM players WHERE world_id='.$id.' AND online=1';

and replace it with:
PHP:
 $q = 'SELECT * FROM players, players_online WHERE players.id = players_online.player_id';

My script looks like this:
http://pastebin.com/WXdmWEzj


To MOD: If this post is in wrong section please move it..
 
don't use ANSI-89 syntax it's bad habbit

corrected
PHP:
$q = 'SELECT p.* FROM `players` p RIGHT JOIN `players_online` po ON p.id = po.player_id'
 
Back
Top