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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Database tables lack prefixes...


Go to End


2 Posts   3025 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 '.