Hi,
as i have this in my code:
$dataProvider=new CActiveDataProvider('Articelsets',array(
'criteria'=>array(
'select'=>'articelIdMaster.*',
'with'=>'articelIdMaster',
'distinct'=>true,
),
));
$this->render('showsets',array(
'dataProvider'=>$dataProvider,
));
I recieve this SQL-Stamtement at the page:
SELECT DISTINCT `t`.`articelsets_id` AS `t0_c0`, `t`.`articel_id_master` AS `t0_c1`, `t`.`articel_id_slave` AS `t0_c2`, `t`.`mandatory` AS `t0_c3`, `t`.`ars_amount` AS `t0_c4`, `articelIdMaster`.`article_id` AS `t1_c0`, `articelIdMaster`.`articelgroup_id` AS `t1_c1`, `articelIdMaster`.`art_number` AS `t1_c2`, `articelIdMaster`.`art_name_short` AS `t1_c3`, `articelIdMaster`.`art_name` AS `t1_c4`, `articelIdMaster`.`art_barcode` AS `t1_c5`, `articelIdMaster`.`art_weight` AS `t1_c6`, `articelIdMaster`.`art_length` AS `t1_c7`, `articelIdMaster`.`art_width` AS `t1_c8`, `articelIdMaster`.`art_height` AS `t1_c9`, `articelIdMaster`.`art_descr` AS `t1_c10`, `articelIdMaster`.`art_service_intervall` AS `t1_c11`, `articelIdMaster`.`art_price` AS `t1_c12`, `articelIdMaster`.`art_buyingdate` AS `t1_c13`, `articelIdMaster`.`art_afa_dauer` AS `t1_c14`, `articelIdMaster`.`art_deleted` AS `t1_c15`, `articelIdMaster`.`art_hasinsurance` AS `t1_c16`, `articelIdMaster`.`art_number_hist` AS `t1_c17`, `articelIdMaster`.`art_homepage` AS `t1_c18` FROM `tbl_articelsets` `t` LEFT OUTER JOIN `tbl_articel` `articelIdMaster` ON (`t`.`articel_id_master`=`articelIdMaster`.`article_id`) LIMIT 10
Why doesn’t yii take care about my select ;(
Thx and cheers Phil