Show Mysql Data With Dataprovider

Hi!

I am newbie and i have some problem with useing dataprovider. I have 2 tables in mysql database. The connection work. championship (table) has 2 column : id and name. The match (table) has 4 column : id, name1, name2, championshipId (FK: championshipId).

My gridList.php (view), with 2 param: dataprovider and labels.

<?php

$this->widget(‘zii.widgets.grid.CGridView’, array(

'id'=&gt;'match-grid',


'dataProvider'=&gt;&#036;dataProvider,


'enablePagination'=&gt;false,





'columns'=&gt;&#036;labels,


)

);

2 models exist with connection (Championship, Match)

MATCH

public function relations()

{


	return array(


                'championship'=&gt;array(self::BELONGS_TO,  'Championship', 'championshipId'),


	);


}

CHAMPIONSHIP

public function relations()

{


	return array(


                'matches'=&gt;array(self::HAS_MANY,  'Match', 'championshipId'),


	);


}

if (isset($_POST[‘Championship’])) {

    &#036;model-&gt;attributes = &#036;_POST['Championship'];


    &#036;championship = Championship::getChampionshipByName(&#036;model-&gt;name);


    


    &#036;dataProvider = new CActiveDataProvider('Match', 


        array(


            'criteria'   =&gt; array(


                'with' =&gt; array(


                    'championship'=&gt;array('joinType'=&gt;'RIGHT JOIN'),


                    ),


                    //'condition1'=&gt;'championship.id'


                    'together'=&gt;true,


                


                'order' =&gt; 'date',


            ),


            'pagination' =&gt; array(


                'pageSize' =&gt; 500,


            ),


        )


    );


    &#036;labels= array_flip(Match::attributeLabels());


    &#036;this-&gt;renderPartial('watcher/gridList', array('labels' =&gt; &#036;labels, 'dataProvider' =&gt; &#036;dataProvider));

}

If post coming with "Championship" it contains just the name of the Championship. and after that i try select all match for a championship.

If somebody could help me that wpuld be great.

Ui.: sorry for my english.

Sorry my bad copy/paste