由于我是初学者所以我在此查询中遇到语法错误。
$SQL = "SELECT * FROM registration WHERE email = ".$email." AND password = ".$password."";
答案 0 :(得分:4)
您的查询语法有误。尝试将其更改为
$SQL = "SELECT * FROM registration WHERE email='".$email."' AND password='".$password."'";
答案 1 :(得分:1)
将单引号添加到值字段
$SQL = "SELECT * FROM registration
WHERE email = '".$email."' AND password ='".$password."'";
答案 2 :(得分:1)
你应该在变量之前和之后加上单引号。
$SQL = "SELECT * FROM registration WHERE email = '".$email."' AND password = '".$password."'";
答案 3 :(得分:0)
$SQL = "SELECT * FROM registration WHERE email='$email' AND password='$password'";
试试这个..
答案 4 :(得分:0)
您传递的是字符串,字符串应该用单引号括起来。试试这个 -
$SQL = "SELECT * FROM registration WHERE email = '".$email."' AND password = '".$password."'";
答案 5 :(得分:0)
请尝试这个,你应该使用单引号。
$SQL = "SELECT * FROM registration WHERE email = '".$email."' AND password = '".$password."'";