Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Database tables lack prefixes...

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

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

Page: 1
Go to End
Author Topic: 2348 Views
  • EvilSeph
    Avatar
    Community Member
    3 Posts

    Database tables lack prefixes... Link to this post

    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.

  • mateusz.ujma
    Avatar
    Google Summer of Code Hacker
    6 Posts

    Re: Database tables lack prefixes... Link to this post

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

    2348 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.