最佳答案
我正在尝试从MySQL表中选择数据,但我收到以下错误消息之一:
mysql_fetch_array()期望参数1是资源,给定布尔值
这是我的代码:
$username = $_POST['username'];$password = $_POST['password'];
$result = mysql_query('SELECT * FROM Users WHERE UserName LIKE $username');
while($row = mysql_fetch_array($result)) {echo $row['FirstName'];}