This question already has an answer here:
Whenever I try to run some code to get a specific cell, I get an error. Here is the code:
<?php
$query = mysql_query("SELECT about_me FROM users WHERE username = '" . $mcu . "'");
if($query === FALSE) {
die(mysql_error()); // TODO: better error handling
}
while($row = mysql_fetch_array($query))
{
$abme = mysql_num_rows($query);
}
?>
About Me:<p> <?php echo "$abme" ?></p>
Here is the error:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in location/to/file.php on line 96
Line 96 is the $row = mysql_fetch_array($query);
.
I did a die check and it says Unknown column 'user_name_here' in 'where clause'
</div>