我有一个错误说
在第 189 行调用 C:\xampp\htdocs\initializr\search.php 中非对象的成员函数 mysql_affected_rows()
当我点击我的提交按钮时。
if(isset($_POST['select'])) {
$studId = $_REQUEST['studid'];
foreach ($studId as $ch) {
$result = $mysqli->query("INSERT INTO tbl_tempCand (datetime, names) VALUES (CURRENT_TIMESTAMP(), '".$ch."')");
//this is my line 189 error
if($row->mysql_affected_rows($result)==0) {
header("Location: registercand.php");
} else {
echo "nothing happen";
}
}
}
这是为什么?