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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.