我收到此错误:
#1064-您的SQL语法有误;检查与您的MySQL服务器版本相对应的手册,以在'“附近使用正确的语法
insert into hall_booking(name,address,event_type,hallNo,arrival_time,arrival_da' at line 1
运行此查询时:
insert into hall_booking (
name,address,event_type,hallNo,arrival_time,arrival_date,dep_time,dep_date,identity,emailid,contact,total_members,desc,catering,service,decoration,other
) values (
'$nm','$add','$typ','$roomno','$arrv','$arrivaldate','$departure','$dDate','$idt','$emailid','$cont','$desc','200','200','200','200')
再次在sql语句中出现问题。我犯了什么错误?
您看起来好像在使用受保护的关键字作为列名(您实际上不应该这样做)。
尝试使用`使其转义
insert into hall_booking (
name,address,event_type,hallNo,arrival_time,
arrival_date,dep_time,dep_date,`identity`,
emailid,contact,total_members,`desc`,catering,service,decoration,other)
values(
'$nm','$add','$typ','$roomno','$arrv',
'$arrivaldate','$departure','$dDate','$idt',
'$emailid','$cont','$desc','200','200','200','200')
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句