Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Database tables lack prefixes...


Reply


2 Posts   2396 Views

Avatar
EvilSeph

Community Member, 3 Posts

31 March 2007 at 7:56pm

Ran into another problem with SilverStripe:

mysql> SELECT * FROM 'Group';
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 ''Group'' at line 1
mysql> SELECT * FROM Group;
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 'Group' at line 1

This problem occurs because you guys have a table called "group" and that is a reserved word for SQL so...this could cause problems...

The server is running MySQL 4.19. Newer versions of MySQL don't seem to have this problem, however MySQL 4.19 is within your listed server requirements.

Avatar
mateusz.ujma

Google Summer of Code Hacker, 6 Posts

1 April 2007 at 5:25am

The correct query should be like that: SELECT * FROM `Group` so you have to use ` instead of '.