Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
Here is the nonfunctioning code:
<?php
mysqlLogin();
$username = $_COOKIE['username'];
$sql = mysql_query("SELECT * FROM `users` WHERE username!='$username'");
if(mysql_num_rows($sql != 0)) {
echo "<table align='center' width='15%'>";
} else {
echo "<center>No users found!</center>";
}
while($row = mysql_fetch_array($query)){
}
?>
Why is it not returning a numerical value?