Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Help with my statistics its messed up!

Junior Spellweaver
Joined
Oct 4, 2009
Messages
113
Reaction score
6
This is the code:
PHP:
 <div class="habblet-container ">		
<div class="cbb clearfix red "> 

<h2 class="title">Hotel Statistics</h2>
<div class="box-content"> 
<div style="text-align: left;">
		<Center>
                        There are <strong>
                        <?php
$query = mysql_query("SELECT COUNT(*) AS aantalbadges FROM users") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalbadges'];
?></strong> Registered Members on Hangout.<br />
                        There are <strong><?php $query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM users WHERE `vip` >= '1'") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> VIP Members on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalmeubels FROM furniture") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalmeubels'];
?></strong> Furniture items on Hangout.<br />
                        There are <strong><?php $query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM users WHERE `rank` >= '6'") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> Staff Members on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM site_news") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> News Articles on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM bans") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> Banned Users on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM user_wardrobe") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> saved outfits on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM rooms") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> Rooms on Hangout.<br />
                        There are <strong>352</strong> Filtered words in rooms on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM bots_petdata") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> Pets on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM bots") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> Bots on Hangout.<br />
                        There are <strong><?php
$query = mysql_query("SELECT COUNT(*) AS aantalkamers FROM groups") or die(mysql_error());
$data = mysql_fetch_assoc($query);

echo $data['aantalkamers'];
?></strong> Groups on Hangout.
	</div></center>

</div>
</div>
</div>

Screenshot:
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Jul 28, 2019
Messages
162
Reaction score
309
First off, that code is... horrendously eye tearing.

Secondly...

what is exactly not working? In your first post, you hand us a couple of DOM elements and some... disgusting database queries... then... you hand us a javascript error.


Also please, if you're new to coding... pleaaaase get a proper IDE and don't use notepad.

Proper IDEs to start off with:
,
,


See blog posts:
 
Upvote 0
Newbie Spellweaver
Joined
May 8, 2019
Messages
12
Reaction score
0
This isn't your stats causing the error. Check your header.php and ensure all stylesheets are correctly linked!
 
Upvote 0
Back
Top