This used to work:
$this->Model->find('all', array(
'fields' => 'Model.field/100 as name')
but I now get a SQL error because the fields are encapsulated with field inverted commas:
SELECT `Model.field/100 as name` FROM models AS Model ..
which should be
SELECT Model.field/100 as name FROM models AS Model ..
I recently installed a newer version of Cakephp 1.3.6 to 1.3.13 but the manuals don’t mention any changes.
This is a very annoying and unncessary problem, does anybody have any ideas?
Ok, found a clue, but still don’t know why:
Cakephp wants the expression to be in parentheses, so
doesn’t work, but
does.