0
내가이 발견 문을 두 번째 찾기 성명에서 내가 사용하려고 노력하지만 두 가지 방법을 사용 하나 찾기 문의 결과를 필요로 여기 CakePHP의 배열의 찾아 문
이 처음이다 오류가 돌아왔다 문을 찾을 수 있습니다, 그것은 SENDER_ID의 여기$sender=$this->Invoice->Find('list', array('fields'=>('sender_id')));
두 번째 찾기 성명 나열, 그것은 sender_id
년대의 목록을 받아 반환 해당 company_name
$senderName=$this->Account->Find('all', array(
'conditions' => array(
$sender=>'account.id')));
,
이 올바른 정보가 그러나 그래서 그것을 이런 식으로
$senderName=$this->Account->Find('all', array(
'conditions' => array(
'id'=>$sender['Invoice']['sender_id'])));
및 송장에 정의되지 않은 인덱스를 얻을 일을 시도,이 에러
Warning (2): Illegal offset type [APP\Controller\InvoicesController.php, line 185]
를 돌려줍니다.