$query_CN = "SELECT Pestcide_trade_name from insecticide where Company_name=Bayer"; $q_result_CN = mysql_query($query_CN);
while($each_ques_CN = mysql_fetch_row($q_result_CN))
{
print $each_ques_CN[0];
}
上述代码 如果我不加 where的话 $query_CN = "SELECT Pestcide_trade_name from insecticide";就好使。如果加上了就会报以下的Warning
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in d:\apm_setup\htdocs\search.php on line 33
line 33 就是 while($each_ques_CN = mysql_fetch_row($q_result_CN)) 这一行,请问这是怎么一回事。先谢谢大家。
------解决方案--------------------
$query_CN = "SELECT Pestcide_trade_name from insecticide where Company_name='Bayer'";
------解决方案--------------------
------解决方案--------------------
... where Company_name='$name'";