我收到一条警告消息,告诉我 mysql_fetch_row 需要参数 1 的资源,我给了它一个对象。
<?php
$con = new mysqli("localhost", "root", "abc123", "profile");
if (mysqli_connect_errno()) {
printf("Connection failed: %s\n", mysqli_connect_error());
exit();
}
$sql = "SELECT * FROM members WHERE member_id = 1243433";
$res = mysqli_query($con,$sql);
$row = mysql_fetch_row($res); // error here
print_r($row);
mysqli_close($con);
?>