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.

General Questions /

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

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

DB::query does NOT work on both Linux and Windows servers


Go to End


2 Posts   1422 Views

Avatar
DeklinKelly

Community Member, 197 Posts

18 August 2010 at 1:00pm

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?

Avatar
Bambii7

Community Member, 254 Posts

18 August 2010 at 2:59pm

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