每当我尝试运行一些代码来获取特定单元格时,都会出现错误。这是代码:
<?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>
这是错误:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in location/to/file.php on line 96
第 96 行是$row = mysql_fetch_array($query);
.
我做了一个模具检查,它在“where子句”中显示未知列“user_name_here”