我在运行create table时不断收到错误消息1064

时间:2015-09-05 14:55:27

标签: php mysql

我是PHP和MySQL的新手,并且在我正在开发的项目上遇到了一些麻烦。我一直收到错误消息#1064-你的SQL语法有错误;检查与您的MySQL服务器版本相对应的手册,以便在'','附近使用正确的语法。

LIKE的表结构

ea_cellcarrier

转储表的约束

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

的约束
ea_appointments

MySQL说:文档

  

1064 - 您的SQL语法出错;检查手册   对应于您的MySQL服务器版本,以便使用正确的语法   靠近'',' PRIMARY KEY(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 ; ),cellco VARCHAR(30)',' cellurl   VARCHAR(30))Co'在第5行

1 个答案:

答案 0 :(得分:0)

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