This seems like a simple question, but I can't get it to work. I've created a virtual field that combines a name and address:
var $virtualFields = array(
'name_address' => 'CONCAT(Venue.name, " - ", Venue.address)'
);
Is there a way to use SUBSTR
on this? (PHP or MYSQL is fine - whichever is best/works).
I've tried this (to no avail):
'name_address' => 'SUBSTR(CONCAT(Venue.name, " - ", Venue.address),0,50)'
I've also tried SUBSTR on the individual fields within the CONCAT.