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

AAC Reborn status on the page HELP!

Solution
I modified the query a bit:
Code:
$reborns = $SQL->query('SELECT reborns FROM ' . $SQL->tableName('players') . ' WHERE `id` = ' . $player->getID())->fetch();

Now it selects player id and also I removed some (i think) useless WHERE clause.
Did you wrote the query yourself? :p

Also, FYI: You're just fetching info from db. You need to output (write) it somewhere.

Also, I optimized your query a bit, cause you were selecting all (with *), but you just need reborns I suppose?

Code:
$reborns_query = $SQL->query('SELECT reborns FROM ' . $SQL->tableName('player') . ' WHERE ' . $SQL->fieldName('reborns') . ' IN (1,4) OR ((' . $SQL->fieldName('reborns') . ' >= (UNIX_TIMESTAMP() - 604800) OR ' . $SQL->fieldName('reborns') . ' = 0) AND ' . $SQL->fieldName('reborns') . ' IN (0,5));')->fetch();

Then, as I said, you need to output it somewhere, you can do it either with echo, when using MyAAC:
Code:
echo $reborns['reborns'];

Or, by editing $main_content variable when using Gesior, like this:
Code:
$main_content .= $reborns['reborns'];
 
I modified the query a bit:
Code:
$reborns = $SQL->query('SELECT reborns FROM ' . $SQL->tableName('players') . ' WHERE `id` = ' . $player->getID())->fetch();

Now it selects player id and also I removed some (i think) useless WHERE clause.
 
Solution
I modified the query a bit:
Code:
$reborns = $SQL->query('SELECT reborns FROM ' . $SQL->tableName('players') . ' WHERE `id` = ' . $player->getID())->fetch();

Now it selects player id and also I removed some (i think) useless WHERE clause.
Yes Yes Yes!!! Thank You :D
 
Back
Top