Parse error:syntax error,unexpected 'id'(T_STRING)怎么解决

jj_ayuan 2017-10-27 04:57:25
这是我在php连接MySQL时出现的问题,表是这样的:
create table news(
id int(10) unsigned auto_increment primary key comment '新闻编号',
title varchar(60) not null comment '新闻标题',
content text not null comment '新闻内容',
addtime timestamp default current_timestamp not null comment '发布时间'
)charset=utf8;
是不是id不能用int?
...全文
2159 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jj_ayuan 2018-01-08
  • 打赏
  • 举报
回复
最后发现是用错单引号,不能用enter左边的那个单引号,而要用数字键1左边的那个半角符
xuzuning 2017-10-28
  • 打赏
  • 举报
回复 1
Parse error:syntax error,unexpected 'id'(T_STRING) 是 php 的错误报告,请你认真看一下他一并提供的出错文件名和行号处
sdkakajian102 2017-10-27
  • 打赏
  • 举报
回复
PHP脚本错误,mysql报错不是这样的。
tottyandbaty 2017-10-27
  • 打赏
  • 举报
回复
你这是PHP脚本错误。。。。。。

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧