0
나는 두 개의 db를 만들고 두 개의 db에서 두 개의 테이블을 조인했습니다. 구문 오류 또는 액세스 위반 : 사용자cakephp의 두 데이터베이스에서 두 테이블 조인
거부 1142 SELECT 명령 내 코드 조인 쿼리 지역에서 작업하지만 라이브 서버에서 작업하지가
SQLSTATE 같은 오류가 [42000] 보여줍니다 질의 :
$holiday_workings = $this->CompoffEntry->find('all', array( 'joins' => array( array( 'table' => 'Meds.employee_details', 'alias' => 'Emp_det', 'type' => 'INNER', 'foreignKey' => false, 'conditions' => array('CompoffEntry.worked_on_period' => $holiday_period,'CompoffEntry.worked_on_date != ' => null,'CompoffEntry.employee_detail_id = Emp_det.employee_detail_id', 'Emp_det.emp_status = "A"',($department != 'all') ? 'Emp_det.department_id = '.$department : '',($roleId == 5) ? 'reporting_id = '.$user_id : ''), ) ) ));
오류 자체가 설명하기가 쉽습니다. "SELECT 명령이 사용자에게 거부되었습니다" – Sefa