• 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!

Znote TFS 1.0 powergamers (MYSQL)

ATT3

Intermediate OT User
Joined
Sep 22, 2010
Messages
512
Reaction score
100
The problem itself sounds quite simple, but I just simply can't figure out.

I am trying to get information from two different tables and subtract some column from another column.
Code:
$znotePlayers = mysql_select_multi("SELECT `a`.*, (`a`.`experience`+`b`.`exphist_lastexp`) AS `expdiff` FROM `players` `a` JOIN `znote_players` `b` ON `a`.`id` = `b`.`id` WHERE `a`.`group_id` < 2 ORDER BY `expdiff` DESC LIMIT ". $limit);
Currently that code doesn't return any numbers.

This far I've managed to;
1. Get information from players and znote_players tables. (done)
2. Compare the id's between each other (done)
3. Subtract (znote_players) 'player_lastexp' from (players) 'experience' (no success)

Anyone got any idea? - much appreciated.

https://github.com/Znote/ZnoteAAC/pull/155 (powergamers.php)
 
If you could send me a backup of your db on skype I can try to get it right. I am not an SQL expert myself so I am not able to find the solution without active testing. :(
 
Back
Top