cakeはver.2.3.9で動作確認済み。


 

$this->ActivityLog->find('all', array(
'fields' => array(
'ActivityLog.id',
'((CASE User.user_type WHEN 'admin' THEN concat_ws(' ',Admin.first_name,Admin.last_name) END)) AS UserName'
),
'joins' => array(
'LEFT JOIN users as User ON ActivityLog.user_id = User.id'
'LEFT JOIN admins as Admin on User.id = Admin.user_id'
),
);

 

結局他の解決方法を使用したので、今回は使わず。

このエントリーをはてなブックマークに追加
Share on Facebook
Post to Google Buzz
Bookmark this on Yahoo Bookmark
Bookmark this on Livedoor Clip
Share on FriendFeed
[`grow` not found]