简体   繁体   English

运行创建表时,我不断收到错误消息1064

[英]I keep getting Error Message 1064 when running create table

I'm new to PHP and MySQL and ran into a little trouble with a project I'm working on. 我是PHP和MySQL的新手,但是我正在从事的项目遇到了一些麻烦。 I keep getting an error message #1064- You have an error in your SQL syntax; 我不断收到错误消息#1064-您的SQL语法有错误; check the manual that corresponds to your MySQL server version for the right syntax to use near '',' 查看与您的MySQL服务器版本相对应的手册,以在'',''附近使用正确的语法

Table structure for table ea_cellcarrier ea_cellcarrier表结构

CREATE TABLE IF NOT EXISTS ea_cellcarrier(
id INT NOT NULL AUTO_INCREMENT  ',' PRIMARY KEY (  `id` ) ,
cellco VARCHAR( 30 )  ','cellurl VARCHAR( 30 )
)

Constraints for dumped tables 转储表的约束

Constraints for table ea_appointments ea_appointments约束

ALTER TABLE  `ea_appointments` 
ADD CONSTRAINT  `ea_appointments_ibfk_2` 
                 FOREIGN KEY (  `id_users_customer` ) 
                 REFERENCES  `ea_users` (  `id` ) ON DELETE CASCADE ON UPDATE CASCADE ,
ADD CONSTRAINT  `ea_appointments_ibfk_3` 
                 FOREIGN KEY (  `id_services` ) 
                 REFERENCES  `ea_services` (  `id` ) ON DELETE CASCADE ON UPDATE CASCADE ,
ADD CONSTRAINT  `ea_appointments_ibfk_4` 
                 FOREIGN KEY (  `id_users_provider` ) 
                 REFERENCES  `ea_users` (  `id` ) ON DELETE CASCADE ON UPDATE CASCADE ;

MySQL said: Documentation MySQL说:文档

1064 - You have an error in your SQL syntax; 1064-您的SQL语法有误; check the manual that corresponds to your MySQL server version for the right syntax to use near '',' PRIMARY KEY ( id ), cellco VARCHAR(30)',' cellurl VARCHAR(30)) Co' at line 5 检查与您的MySQL服务器版本相对应的手册,以在第5行的'','PRIMARY KEY( id ),cellco VARCHAR(30)','cellurl VARCHAR(30)Co'附近使用正确的语法

CREATE TABLE IF NOT EXISTS ea_cellcarrier
(
  id INT NOT NULL AUTO_INCREMENT, 
  cellco  VARCHAR(30) ,
  cellurl VARCHAR(30) ,
  PRIMARY KEY (`id`) 
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM