• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Request Account on database, player on database etc. on Gesior 1.0.1

Lightonia

Lightonia.servegame.com
Joined
Jun 4, 2007
Messages
492
Reaction score
9
Hi, i request something like this on my Gesior 1.0.1 2012 latestnews.
news.png
 
Code:
$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
$bans = $SQL->query('SELECT COUNT(*) FROM `bans`;')->fetch();
$guilds = $SQL->query('SELECT COUNT(*) FROM `guilds`;')->fetch();

And read it by php like:

$accounts[0];
$players[0];
$bans[0];
$guilds[0];
 
Last edited:
It have to work ^_^.

Paste it and try.
Code:
<?php
$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
?>
Code:
<tr><td>Characters:</td>
<td><?php echo $players[0]; ?> </td></tr>
<tr><td>Accounts:</td>
<td><?php echo $accounts[0]; ?></td></tr>
 
You could make a new "box" like this in latestnews.php only if you would like that.

p4yec5.png
 
Cant cuz i got lots of other edited stuff on my latest news and it took too long time to get them on the exact spot where i wanted it to be

- - - Updated - - -

Solved!
 
Back
Top