你的SQL语法有错误 - 靠近'左边'

S.M*_*ian 0 php mysql sql reserved-words

我是php编程的新手.

我想应用插入查询,但我收到此错误:

您的SQL语法有错误; 查看与您的MySQL服务器版本对应的手册,以便在"左"附近使用正确的语法VALUES('****df','****2135gh','***@ yahoo.com'在第2行"}

$sql_insert_new_user = "insert into users (username,password,email,status,finance,province,city,address,tell,
mobile,admin_seen,type,left) VALUES ('$username','$password','$email',1,0,$town,$city,
'$address','$telephone','$mobile',0,'employe',0)";

            mysql_query($sql_insert_new_user);
            $error = mysql_error();
Run Code Online (Sandbox Code Playgroud)

Abh*_*rty 7

left 是一个保留字,在查询中你需要用背景来逃避

`left`
Run Code Online (Sandbox Code Playgroud)

https://dev.mysql.com/doc/refman/5.5/en/reserved-words.html