Tony
Tony

Reputation: 1

Is there anything wrong with my cakephp find statement?

I have this find statement written in cakePhp:

$this->find('all', array(
            'conditions' => array('EvaluationMixeval.grp_event_id' => $grpEventId, 'EvaluationMixeval.evaluatee' => $evaluatee),
            'fields' => array('EvaluationMixevalDetail.*'),
            'joins' => array(
                array(
                    'tabel' => 'evaluation_mixeval_details',
                    'alias' => 'EvaluationMixevalDetail',
                    'type' => 'LEFT',
                    'conditions' => array('EvaluationMixeval.id = EvaluationMixevalDetail.evaluation_mixeval_id')
                )
            )
        ));

but everytime I execute it, I get this SQL error:

SQL Error: 1146: Table 'IpeerTest.join_table' doesn't exist

Does anyone know what's going on?

Upvotes: 0

Views: 129

Answers (1)

Dunhamzzz
Dunhamzzz

Reputation: 14798

Check your typo on 'tabel' in the join array..

Upvotes: 4

Related Questions