Web Hosting Talk







View Full Version : mySQL Syntax Error


[UN]Jake
07-10-2003, 01:52 PM
CREATE TABLE `plans` (

`planID` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`name` CHAR( 32 ) NOT NULL ,
`description` TINYTEXT NOT NULL ,
`price` FLOAT( 6, 2 ) NOT NULL ,
`setup` VARCHAR( 6, 2 ) NOT NULL ,
`active` CHAR( 3 ) NOT NULL ,
PRIMARY KEY ( `planID` )
)

SPaReK
07-10-2003, 03:42 PM
VARCHAR only takes 1 argument, I believe. I think that is all I've ever used, but it may allow a 2nd argument. Someone can correct me if I'm wrong.

blackbelt080
07-10-2003, 04:12 PM
Varchar suggests if a zero-length character string arises. A string can be numeric or a character which depends on the type of data. I believe you are right. There can only be one argument with up to 255 characters.

Take care,
Smiley :D

[UN]Jake
07-10-2003, 09:14 PM
Oh...Its an error :( It should be Float(6,2)

Thanks Everyone