Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
Dale
- Forum Contributor
- Posts: 466
- Joined: Fri Jun 21, 2002 5:57 pm
- Location: Atherstone, Warks
Post
by Dale »
CREATE TABLE `df_users` (
`id` INT( 5 ) NOT NULL AUTO_INCREMENT ,
`username` VARCHAR( 50 ) NOT NULL ,
`password` VARCHAR( 50 ) NOT NULL ,
`email` VARCHAR( 50 ) NOT NULL ,
`web` VARCHAR( 50 ) NOT NULL ,
`bio` LONGTEXT( 500 ) NOT NULL ,
`regdate` DATE( 10 ) NOT NULL ,
PRIMARY KEY ( `id` )
)
MySQL said:
#1064 - You have an error in your SQL syntax near '(500) NOT NULL, `regdate` DATE(10) NOT NULL, PRIMARY KEY (`id`))' at line 1
I always get an error like this and its buggin me cuz i dont know what wrong. Please help me.
-
Weirdan
- Moderator
- Posts: 5978
- Joined: Mon Nov 03, 2003 6:13 pm
- Location: Odessa, Ukraine
Post
by Weirdan »
*text fields are not supposed to have any predefined length.
-
Dale
- Forum Contributor
- Posts: 466
- Joined: Fri Jun 21, 2002 5:57 pm
- Location: Atherstone, Warks
Post
by Dale »
oh... silly me
Thank You