Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with importing database from laptop to server, getting error!

Status
Not open for further replies.

spewn

Programmer
May 7, 2001
1,034
i am transferring my database to the server via phpmyadmin...i went to export and can see my tables in phpmyadmin, yet there is an error:

Code:
CREATE TABLE `offers` (

`offerID` int( 4 ) unsigned zerofill NOT NULL AUTO_INCREMENT ,
`offerName` varchar( 100 ) NOT NULL default '',
`offerName2` varchar( 100 ) NOT NULL default '',
`offerType1` varchar( 100 ) NOT NULL default '',
`offerType2` text NOT NULL ,
`offerLink` text NOT NULL ,
`offerImgSmall` text NOT NULL ,
`bannerImg` text NOT NULL ,
`rightNavImg` text NOT NULL ,
`offerPitch` text NOT NULL ,
`offerTitle` text NOT NULL ,
PRIMARY KEY ( `offerID` ) 
) ENGINE = MYISAM DEFAULT CHARSET = latin1 
MySQL said:  

#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 'DEFAULT CHARSET=latin1' at line 14

any ideas? i am running 4.1, and the server might be 4.0, but i don't want that to taint your response...what do i need to do here?

- g
 
Maybe you need a comma between MYISAM and DEFAULT?

Code:
CREATE TABLE `offers` (

`offerID` int( 4 ) unsigned zerofill NOT NULL AUTO_INCREMENT ,
`offerName` varchar( 100 ) NOT NULL default '',
`offerName2` varchar( 100 ) NOT NULL default '',
`offerType1` varchar( 100 ) NOT NULL default '',
`offerType2` text NOT NULL ,
`offerLink` text NOT NULL ,
`offerImgSmall` text NOT NULL ,
`bannerImg` text NOT NULL ,
`rightNavImg` text NOT NULL ,
`offerPitch` text NOT NULL ,
`offerTitle` text NOT NULL ,
PRIMARY KEY ( `offerID` ) 
) ENGINE = MYISAM, DEFAULT CHARSET = latin1

[cheers]
Cheers!
Laura
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top