Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\ictsystem\Home.php on line 51
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\ictsystem\Home.php on line 107
if ($rbtchoice=="a")
{
$sql = "Select * From cstservice";
}
else if($rbtchoice=="q")
{
$sql = "Select * From cstservice Where sv_status<>'S'";
}
$dbquery = mysql_db_query($db,$sql);
$num_rows=mysql_num_rows($dbquery);
เขียนใหม่แบบนี้ดีไหม Code (PHP)
if($rbtchoice=="q")
{
$sql = "Select * From cstservice Where sv_status<>'S'";
}else{
$sql = "Select * From cstservice";
}
$dbquery = mysql_db_query($db,$sql) or die(mysql_error()); // ใส่นี่เข้าไปด้วยจะได้เห็นว่า error อะไร
$num_rows=mysql_num_rows($dbquery);
Date :
2011-07-14 10:53:10
By :
PlaKriM
No. 3
Guest
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\ictsystem\Home.php on line 105 คือ บรรทัดที่ 107อะคะขึ้นอยู่คะ ^o^