Hello,
i tried to use mysql function `YEAR` in fields list, but faced with
some problems. That field is returned in special array, see debug
output and you will understand what i am talking about.
$class->bindModel( array(
'hasMany' => array('Project' => array(
'fields' => array(
'id', 'name', 'apartments_total',
'building_start', 'year( building_finnish ) as
building_finnish' )))));
debug( $model->findAll() );
[3] => Array
(
[Class_] => Array
(
[id] => 6
[name] => test
)
[Project] => Array (
[1] => Array
(
[id] => 41
[name] => dasdas
[apartments_total] => 0
[building_start] => 2008-12-31 00:00:00
[class_id] => 6
[Project] => Array <---- How to eliminate
this array ??
(
[0] => Array
(
[building_finish] => 2008
)
)
)
)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---