Page 1 of 1

phpmyadmin / MySQL error message - help please

Posted: Wed Nov 19, 2008 6:13 am
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

Re: phpmyadmin / MySQL error message - help please

Posted: Wed Nov 19, 2008 6:23 am
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.

Re: phpmyadmin / MySQL error message - help please

Posted: Wed Nov 19, 2008 6:31 am
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