phpmyadmin / MySQL error message - help please

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sjk1000
Forum Commoner
Posts: 26
Joined: Tue Nov 11, 2008 8:50 am

phpmyadmin / MySQL error message - help please

Post by sjk1000 »

Hi All
I get the error msg below when using the create table 'wizard' in phpmyadmin. The script it generates and the error are below. Any help would be very much appreciated
Thanks, Steve

SQL query:

CREATE TABLE `boardga_sql1`.`seller_stock` (
`seller_id` INT( 3 ) NOT NULL ,
`ID` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`products_model` VARCHAR( 20 ) NOT NULL ,
`stock_quantity` INT( 5 ) NOT NULL ,
`products_price` DOUBLE( 7 ) NOT NULL ,
`shipping_price` DOUBLE( 7 ) NOT NULL ,
`seller_sameday_price` DOUBLE( 7 ) NULL
)

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 ') NOT NULL ,
`shipping_price` DOUBLE( 7 ) NOT NULL ,
`seller_sameday_price` DO' at line 6
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: phpmyadmin / MySQL error message - help please

Post by Eran »

You can't specify length for float and double types. MySQL float has precision ranging from 0-23, and a double has precision in the 24-53 range.
sjk1000
Forum Commoner
Posts: 26
Joined: Tue Nov 11, 2008 8:50 am

Re: phpmyadmin / MySQL error message - help please

Post by sjk1000 »

Thanks for that pytrin. I'd narrowed it down to those lines but couldn't figure out the reason I was getting the error.
Cheers, Steve
Post Reply