Message of the day:
Release 4.5.0 is out. Changelog: https://docs.silverstripe.org/en/4/changelogs/4.5.0
SilverStripe 4 related information and questions.
I assume this is what you mean by “sql mode”, from a recent project:
- // MySQL 5.7+ is much more strict on grouping. Instead of rewriting the entire ORM-generated query,
- // we can just shut it up by putting it in a more lenient mode for this query
- DB::query("SET SESSION sql_mode='REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE';");
There’s no direct PHP API available for it though
You can always just run a
DB::query() with some raw SQL
Hi, is there option that I can update sql mode for my custom
Ignore me, I am dumb
Ah, I suspect it is showing me draft objects because I am logged in as admin right...
Wait...I am not even using
getComponents() 🤦 I have this:
- $list = CreativeWork::get()
- 'Created' => 'DESC',
- 'ID' => 'ASC'
It should do that automatically if you’re viewing the live stage