作业帮 > 综合 > 作业

$result=mysql_query("INSERT INTO table_zc(account,password,n

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/10 02:05:14
$result=mysql_query("INSERT INTO table_zc(account,password,name,sex,introduce,prosition,createtime) VALUES ("$account","$password","$sex","$name","$introduce","$prosition","$createtime")");
请问这个提示“
Parse error:syntax error,unexpected T_VARIABLE in C:\localhost\zc\source\check.php on line 48”错误,是哪里不对了
$result=mysql_query(
因为你的sql语句是用双引号引的,所以sql语句里的values括号里的值就应该用单引号引起来 不然程序就不知道该翻译你的这条语句了应该是
$result=mysql_query(" INSERT INTO table_zc(account,password,name,sex,introduce,prosition,createtime)
VALUES (' "$account" ' ,' "$password" ' ,' "$sex" ' ,' "$name" ' ,' "$introduce" ' ,' "$prosition" ' ,' "$createtime" ')");