NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

MySQL – fields table is not good idea

Posted on January 28, 2007 - Filed Under RubyOnRails

Another gotcha. This time with MySQL (4.1). I just have learned that using table named fields is not possible. Why?

mysql> CREATE TABLE fields (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY);
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
 'fields (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY)' at line 1

It looks like my plan to use field model have failed :))

Popularity: 3% [?]

Hits for this post: 2717

Similar Posts

Comments

Leave a Reply