Error Please Help |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Zymic Free Web Hosting Databases & MySQL |
||
![]() |
Error Please Help |
||
Jan 4 2008, 01:26 PM
Post
#1
|
|
![]() Outrageously Uber Ninja ![]() Group: Community Helper Posts: 1,756 Joined: 11-November 07 From: HouseMaybe? Member No.: 2,689 |
When i create this table I get the following
CODE Error SQL query: CREATE TABLE `messages` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `title` VARCHAR( 255 ) NULL `message` TEXT NOT NULL , `from` INT( 11 ) NOT NULL , `to` INT( 11 ) NOT NULL , `from_viewed` BOOL NOT NULL DEFAULT '0', `to_viewed` BOOL NOT NULL DEFAULT '0', `from_deleted` BOOL NOT NULL DEFAULT '0', `to_deleted` BOOL NOT NULL DEFAULT '0', `from_vdate` DATETIME NULL , `to_vdate` DATETIME NULL , `from_ddate` DATETIME NULL , `to_ddate` DATETIME NULL , `created` DATETIME NOT NULL ) ENGINE = MYISAM 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 '`message` TEXT NOT NULL , `from` INT( 11 ) NOT NULL , `to` INT( 11 ) NOT NULL ' at line 4 Can Anyone Help me With This ? Thanks Allot Crown |
|
|
Jan 4 2008, 02:32 PM
Post
#2
|
|
|
zIRC Network Admin ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrators Posts: 660 Joined: 10-March 07 From: Swindon, Wilts, UK Member No.: 6 |
Erm... you've missed a comma after the NULL and before `message` (and you don't need to define NULL at all, it's the default, only NOT NULL is required).
|
|
|
Jan 4 2008, 08:02 PM
Post
#3
|
|
![]() Outrageously Uber Ninja ![]() Group: Community Helper Posts: 1,756 Joined: 11-November 07 From: HouseMaybe? Member No.: 2,689 |
|
|
|
![]() |
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 19th June 2013 - 10:04 PM |