我想知道和之间的mysqli_fetch_assoc($query);
区别$query->fetch_assoc();
这是我的查询:
$checkquery = mysqli_query($con,"SELECT admin_id FROM admin WHERE name='$username' AND password='md5($password)'") or
die (mysqli_error($con));
$correct = $checkquery->fetch_assoc();
if (!$correct)
$errors[] = 'Incorrect login.';
当我把它写成:时它对我有用$correct = $checkquery->fetch_assoc();
,但是当我把它改成时$correct = mysqli_fetch_assoc($checkquery);
,它不再对我有用了。