Jump to:

22997 Posts in 11853 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » DB::query does NOT work on both Linux and Windows servers

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 969 Views
  • DeklinKelly
    Avatar
    Community Member
    196 Posts

    DB::query does NOT work on both Linux and Windows servers Link to this post

    This works on my Linux server but not on my Windows server:

    DB::query("DELETE FROM FeatureAuthorScheduleItem WHERE `Date` < '".date('Y-m-d')."'");

    This works on my Windows server but not on my Linux server:

    DB::query("DELETE FROM featuredauthorscheduleitem WHERE `Date` < '".date('Y-m-d')."'");

    How can I make this work on both servers? Is there a way to catch the error and try the second way if the first way fails?

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: DB::query does NOT work on both Linux and Windows servers Link to this post

    Wont that be a config setting in your MySQL. Looks like one only supports lower case table names. In your windows MySQL ini file you'll need to flag

    lower_case_table_names = 2

    969 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.