ggangix
(Giuseppemiro)
1
Hello everybody,
I have a problem about 2 compare-with in the same CDbCriteria.
I wrote something like that:
$criteria->with = array('city'=>array('select'=>'name_city','together'=>true));
$criteria->with = array('clinic'=>array('select'=>'name_clinic','together'=>true));
But the second “with” overwrites the first “with” and doesn’t work.
Can you guys help me?
Thank you in advance.
alirz23
(Ali Raza)
2
merge them into one array like so
<?php
$criteria->with = array(
'city'=>array('select'=>'name_city','together'=>true),
'clinic'=>array('select'=>'name_clinic','together'=>true)
);
ggangix
(Giuseppemiro)
3
Thank you so much. Works perfect! ![:)](http://www.yiiframework.com/forum/public/style_emoticons/default/smile.gif)