LucidCMS Error Web 

Socius Decennalis
Decennium
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:

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:
qLvMX2I - LucidCMS Error - RaGEZONE Forums


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
 
line 3 is : $plyonline = mysql_num_rows($countonline); it's connected with line 2 $countonline = mysql_query("SELECT * FROM accounts where loggedin = 2"); which selects something from your database, so check if your database is connected and make sure you have the sql file executed
 
Upvote 0
line 3 is : $plyonline = mysql_num_rows($countonline); it's connected with line 2 $countonline = mysql_query("SELECT * FROM accounts where loggedin = 2"); which selects something from your database, so check if your database is connected and make sure you have the sql file executed

Yeah..so it's selecting the accounts table and if the "loggedin" column is = 2. it will display one player online, correct? And currently my database does have that column and same table name.
I believe my database is connected to the cms because. I've changed the IP, database, root name and pw. which are usually the only things required to change to load up the site xD

However..about the SQL.. i haven't executed any for the CMS? Nor do i think there was any provided, so if i was to create my own SQL.. what will the sql need to execute?

Thanks btw :3
 
Upvote 0
Back