SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Creating table not working
-
Feb 2, 2006, 17:37 #1
- Join Date
- Feb 2005
- Location
- Iceland
- Posts
- 117
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Creating table not working
Hi guys, stupid question here:
why isn't the following working in MySql:
PHP Code:mysql> CREATE TABLE programming (
-> id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-> name TINYTEXT,
-> desc TEXT,
-> files INT NOT NULL);
PHP Code:ERROR 1064 (42000): 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 'desc TEXT,
files INT NOT NULL)' at line 4
Jonatan Nilsson
Iceland
C# Programmer - XML & DirectX (y = hx + c)
-
Feb 2, 2006, 19:37 #2
- Join Date
- Sep 2001
- Location
- Panama
- Posts
- 2,181
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Because 'desc' is a reserved word in MySQL. Try using a different name like 'description'.
Community Guidelines | Community FAQ
"He that is kind is free, though he is a slave;
he that is evil is a slave, though he be a king." - St. Augustine
-
Feb 3, 2006, 01:01 #3
- Join Date
- Feb 2005
- Location
- Iceland
- Posts
- 117
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks, it is working now
Jonatan Nilsson
Iceland
C# Programmer - XML & DirectX (y = hx + c)
Bookmarks