Jump to content

[SOLVED] SQL String


LightningSt

Recommended Posts

In PHP myadmin I am trying to actually insert the information in using the code that it creates when you do it  by clicking on create table... this is what I have and it sin't working... I was wondering whats wrong?

 

The Error I get is

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE `locations`.`locations` (
`ID` INT NOT NULL AUTO_INCREMENT COMMENT' at line 7 

 

 

CREATE TABLE `clients`.`clients` (
`ID` INT NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`Name` TEXT NOT NULL COMMENT 'Client Name' ,
PRIMARY KEY ( `ID` )
) ENGINE = MYISAM COMMENT = 'Table of Client Names'

CREATE TABLE `locations`.`locations` (
`ID` INT NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`Cloc` TEXT NOT NULL COMMENT 'Location Name' ,
`Ccon` TEXT NOT NULL COMMENT 'Contact Name' ,
`Cphn` TEXT NOT NULL COMMENT 'Phone Number' ,
`Cadr` TEXT NOT NULL COMMENT 'Address' ,
`Czip` TEXT NOT NULL COMMENT 'Zip Code' ,
`Cstt` TEXT NOT NULL COMMENT 'State' ,
`Ccit` TEXT NOT NULL COMMENT 'City' ,
`ClID` INT NOT NULL COMMENT 'Client Name Association' ,
PRIMARY KEY ( `ID` )
} ENGINE = MYISAM COMMENT = 'Table of Locations'

Link to comment
https://forums.phpfreaks.com/topic/114278-solved-sql-string/
Share on other sites

here i deleted the .clients and .loactions

and then i change the { to ) thats all

and i tested it to my phpmyadmin and its working now

 

CREATE TABLE `clients` (

`ID` INT NOT NULL AUTO_INCREMENT COMMENT 'Identifier',

`Name` TEXT NOT NULL COMMENT 'Client Name' ,

PRIMARY KEY ( `ID` )

) ENGINE = MYISAM COMMENT = 'Table of Client Names';# MySQL returned an empty result set (i.e. zero rows).

 

 

CREATE TABLE `locations` (

`ID` INT NOT NULL AUTO_INCREMENT COMMENT 'Identifier',

`Cloc` TEXT NOT NULL COMMENT 'Location Name' ,

`Ccon` TEXT NOT NULL COMMENT 'Contact Name' ,

`Cphn` TEXT NOT NULL COMMENT 'Phone Number' ,

`Cadr` TEXT NOT NULL COMMENT 'Address' ,

`Czip` TEXT NOT NULL COMMENT 'Zip Code' ,

`Cstt` TEXT NOT NULL COMMENT 'State' ,

`Ccit` TEXT NOT NULL COMMENT 'City' ,

`ClID` INT NOT NULL COMMENT 'Client Name Association' ,

PRIMARY KEY ( `ID` )

) ENGINE = MYISAM COMMENT = 'Table of Locations';# MySQL returned an empty result set (i.e. zero rows).

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/114278-solved-sql-string/#findComment-591397
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.