Join query using two table with where condition in cake php?
问题 How we can write Join query using two table with where condition in cake php? 回答1: You can!! check this if it would help you $table = 'table_name'; $query['conditions'] = array($table.'.entity_id' => $entity_id, $table.'.is_active' => 1); $query['fields'] = array('creator.first_name AS cf_name', 'creator.last_name AS cl_name', 'creator.email AS c_email', 'usr.first_name', 'usr.last_name', $table.'.id AS id', $table.'.guid', $table.'.updated_date', 'usr.email AS email'); // To do joining to