Hello. I’m trying to join two tables. I’m using the following code:
$jobCriteria = new CDbCriteria;
$jobCriteria->join = 'JOIN customer ON customer.id = customer_client_id';
$jobCriteria->select = 't.id, lang_id, customer_client_id, title, last_search_day, t.active, status, customer.name';
$jobCriteria->addInCondition('customer_client_id', $customer_ids);
$jobCriteria->addCondition('status = 11');
$result = Job::model()->findAll($jobCriteria);
But I’m only getting data from the job table and no data from the customer table. I’ve tried the SQL statement in phpMyAdmin, and it works there. Anyone seeing what’s wrong here? Thanks in advance!