Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help With SQL Error


enigmabunny

Recommended Posts

hi im getting the following error when trying to import a SQL file.

 

SQL query:

 

CREATE TABLE `products_description` (

 

`products_id` int( 11 ) NOT NULL AUTO_INCREMENT , `language_id` int( 11 ) NOT NULL default '1', `products_name` varchar( 64 ) NOT NULL , `products_description` text, `products_url` varchar( 255 ) default NULL , `products_viewed` int( 5 ) default '0', `products_head_title_tag` longtext, `products_head_desc_tag` longtext NOT NULL , `products_head_keywords_tag` longtext NOT NULL , PRIMARY KEY ( `products_id` , `language_id` ) , KEY `products_name` ( `products_name` )

) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =3528;

 

 

 

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 'CREATE TABLE `products_description` (

`products_id` int(11) NOT NULL auto_' at line 1

Link to comment
Share on other sites

'CREATE TABLE `products_description` (

`products_id` int(11) NOT NULL auto_' at line 1 [/b]

Looks like that has been made with the successor of Front Page (that will add UTF code in the first part of a file: ). Remove that with a text editor and try again.

Link to comment
Share on other sites

this is the actual code from the document, and it doesnt have those characters, coud it be something to do with how i am saving it? what is the correct way?

 

CREATE TABLE `products_description` (

`products_id` int(11) NOT NULL auto_increment,

Link to comment
Share on other sites

this is the actual code from the document, and it doesnt have those characters

That is right. They are UTF-8 code headers I believe and are invisible unless you open the file in a text editor. Or if you are on Windows, use Notepad to open and save it. That will probably get rid of the UTF-8 stuff. See for example this page where the problem is mentioned.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...