'Interestslogs'というテーブルがあり、モデルの名前はInterestlogです。
Cakephpのそのテーブルからidに従ってclient_idを取得する必要があります。
$client_id = $this->Interestslog->find('first',array(
'conditions' => array('Interestslogs.id' => $id),
'fields' => array('Interestslogs.client_id'),
)
);
ただし、データベースエラーが発生します。
Database Error
エラー:SQLSTATE [42S22]:列が見つかりません:1054不明な列'フィールドリスト'のInterestslogs.interest_id'
SQLクエリ:SELECT Interestslogs。interest_idFROM efa。interestslogs左のInterestslog参加者としてefa。interestsAS InterestON(Interestslog。interest_id= Interest。id)LEFTJOIN efa。clientsAS ClientON(Interestslog。client_id= Client。id)WHERE Interestslogs。id= 1 LIMIT 1