close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySql Import problema

Thread began 8/06/2009 5:43 pm by lionel307143 | Last modified 8/17/2009 4:36 pm by Eric Mittman | 1965 views | 3 replies |

lionel307143

MySql Import problema

Hello:

I try to import the store.sql file in my database and this is the error i got:
*******************************
Error

SQL query:

CREATE TABLE IF NOT EXISTS `orders` (
`OrderID` int( 11 ) NOT NULL AUTO_INCREMENT ,
`OrderUserID` int( 11 ) NOT NULL ,
`OrderAmount` float NOT NULL ,
`OrderShipName` varchar( 100 ) NOT NULL ,
`OrderShipAddress` varchar( 100 ) NOT NULL ,
`OrderShipAddress2` varchar( 100 ) NOT NULL ,
`OrderCity` varchar( 50 ) NOT NULL ,
`OrderState` varchar( 50 ) NOT NULL ,
`OrderZip` varchar( 20 ) NOT NULL ,
`OrderCountry` varchar( 50 ) NOT NULL ,
`OrderPhone` varchar( 20 ) NOT NULL ,
`OrderFax` varchar( 20 ) NOT NULL ,
`OrderShipping` float NOT NULL ,
`OrderTax` float NOT NULL ,
`OrderEmail` varchar( 100 ) NOT NULL ,
`OrderDate` timestamp NOT NULL default CURRENT_TIMESTAMP ,
`OrderShipped` tinyint( 1 ) NOT NULL default '0',
`OrderTrackingNumber` varchar( 80 ) default NULL ,
PRIMARY KEY ( `OrderID` )
);

MySQL said: Documentation
#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 'CURRENT_TIMESTAMP,
`OrderShipped` tinyint(1) NOT NULL defaul
**************************************

Please check for a solution and let me know... Thank you.

Sign in to reply to this post

Eric Mittman

It seems that it does not like the default value for the OrderDate column. Do you know what version of MySQL you are working with? This should be valid and working with the newer versions of MySQL 5.

One thing that you may want to try is to remove the default clause for that column. This should make it the same way but not explicitly referenced in the sql. Depending on your version of MySQL you may also want to use a datetime format instead of a timestamp format, both should store the same values.

Sign in to reply to this post

lionel307143

MySQL

MySQL version at the server is 5.1 I have not tried your second choice. Let me know if I still need to try it

Sign in to reply to this post

Eric Mittman

If you are getting the error the same as before then removing the default clause should clear it up.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...