The page here: https://docs.silverstripe.org/en/4/developer_guides/model/data_types_and_casting/
Has that example syntax for an Enum. I get an SQL syntax error with that.
This however works:
'Condition' => "Enum(array('New', 'Fair', 'Junk'), 'New')"
Versions.
Silverstripe: 4.7.2.
PHP: 7.3.27.
MySQL: 5.7.33
Hi,
If you scroll down to the bottom of that page, you should see a link titled ‘Edit on Github’. Here you can suggest edits to the documentation pages directly via a PR.
It’s a good way to get involved in the maintenance of things like the documentation, which relies on contributions from the community to stay up-to-date.
Cheers