- Joined
- Nov 26, 2012
- Messages
- 156
- Reaction score
- 35
Hi everyone,
So i'm trying to use the LucidMS CMS to redesign it etc.. however im getting an error on the index page.
The error says:
And an image of the full error:
And my code for where the error happening is
Any help would be greatly appreciated as i cannot simply fix it. D:
Thanks
-Xrin
So i'm trying to use the LucidMS CMS to redesign it etc.. however im getting an error on the index page.
The error says:
PHP:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\includes\nav.php on line 3
And an image of the full error:
And my code for where the error happening is
Code:
<?php
$countonline = mysql_query("SELECT * FROM accounts where loggedin = 2");
$plyonline = mysql_num_rows($countonline);
$url = $_SERVER['REQUEST_URI'];
?>
<div class="container">
<div class="sixteen columns">
<div id="logo"></div>
<nav>
<ul>
<li <?php if ($url == '/?p=home' or $url == '/?p=index' or $url == '/') { ?>class="nhome" <?php } ?>><a href="?p=index">Home</a></li>
<li <?php if ($url == '/?p=signup') { ?>class="nhome" <?php } ?>><a href="?p=signup">Sign Up</a></li>
<li <?php if ($url == '/?p=download') { ?>class="nhome" <?php } ?>><a href="?p=download">Download</a></li>
<li <?php if ($url == '/?p=vote') { ?>class="nhome" <?php } ?>><a href="?p=vote">Vote</a></li>
<li <?php if ($url == '/?p=donate') { ?>class="nhome" <?php } ?>><a href="?p=donate">Donate</a></li>
<li <?php if ($url == '/?p=chat') { ?>class="nhome" <?php } ?>><a href="?p=chat">Chat</a></li>
<li><a href="<?php echo $forum; ?>" target="_blank">Community</a></li>
</ul>
</nav>
<div id="scroller_box">
<div id="scroller_inside">
<marquee scrollamount="10">Welcome to <?php echo $servername; ?>! <strong>Our rates are <?php echo $exprate; ?>x/<?php echo $mesorate; ?>x/<?php echo $droprate; ?>x.</strong> Have fun playing and don’t forget to vote every 6 hours!</marquee>
</div>
</div>
</div><!-- Three Columns =================================== -->
<!-- first -->
<div class="one-third column">
<div class="top_contents">
<div class="c_spacing">
<div class="left">
<?php if ($plyonline > 0) { ?>
<img src="images/tools/online.png"></div>
<?php } else { ?>
<img src="images/tools/offline.png"></div>
<?php } ?>
<div class="top_right">
<?php if ($plyonline > 0) { ?>
<h5><?php echo $servername; ?> is <span class="green">Online</span><br /><span class="green"><?php echo $plyonline; ?></span> players logged in.</h5>
<p>
Channel Server . . <span class="green lowercase">Online</span><br />
Login Server . . <span class="green lowercase">Online</span><br />
World Server . . <span class="green lowercase">Online</span>
</p>
<?php } else { ?>
<h5><?php echo $servername; ?> is <span class="red">Offline</span><br /><span class="red"><?php echo $plyonline; ?></span> players logged in.</h5>
<p>
Channel Server . . . <span class="red lowercase">Offline</span><br />
Login Server . . . <span class="red lowercase">Offline</span><br />
World Server . . . <span class="red lowercase">Offline</span>
</p>
<?php } ?>
</div>
</div>
</div>
</div>
Any help would be greatly appreciated as i cannot simply fix it. D:
Thanks
-Xrin

