我无法使用以下内容从我的表中获取数据。
$email = $_POST['email'];
$password = md5($_POST['password']);
$query = "SELECT * FROM users WHERE (email,password) VALUES (:email,:password)";
$stmt = $dbh->prepare($query);
$stmt->bindParam(':email', $email);
$stmt->bindParam(':password', $password);
$stmt->execute();
if(!$query){
echo 'Whoops, something went wrong!';
} else {
while($r = $stmt->fetch(PDO::FETCH_LAZY)){
echo $r['surname'];
}
};
谁能看到我哪里出错了?由于不工作,没有任何内容输出到我的浏览器