frameworks - How can join two table in yii with standard? -


i new in yii framework. , want know take date 2 table join.

i try many times not solve.

i know join , know use manually. not yii standard.

i want know how can join 2 table in yii framework standard.

in yii want use join code in $criteria object

e.g.

$criteria=new cdbcriteria; $criteria->with =array('customer'=>array('select'=>'{{customer}}.*','jointype'=>'left outer join', ), ); 

and use relation function like

public function relations() { return array( 'customer' => array(self::belongs_to, 'customer', 'customer_id'), ); }

i think solve question


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -