任何人都可以告訴我爲什麼我收到這些錯誤,當我這樣做?mysql_fetch_array&num_rows錯誤 - 幫助!
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\login\index.php on line 63
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\login\index.php on line 65
當我這樣做::
$sql="SELECT id FROM users WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
$active=$row['active'];
$count=mysql_num_rows($result);