Warning: mysql_query() expects parameter 1 to be string, null given in

Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in

错误是出现在
$result = mysql_query($res,$con);
去掉就可以了,因为这里的$res不是一个string类型.
然后
$res=mysql_query("select * from cards where id={$_POST['cardno']}");//echo $result;
改成
$result = mysql_query("select * from cards where id={$_POST['cardno']}");//echo $result;
温馨提示:答案为网友推荐,仅供参考
第1个回答  2016-06-13
参数类型不对追问

我里面include了一个mysql.class.php类。我想知道怎么修改。

相似回答