Findall() Limit, Offset Not Working

This find is works as i expected except there are many entries with "change_date <= :change_date" and it stops to the last one and i need it to stop just after it finds the first "change_date".

i tried to do this with limit, offsed and no success




$away = Fighters::model()->with(array(

        'fightersUpds' => array(

                'select'	=> 'id_fighter,id_league,change_date',

                'condition' => 'fightersUpds.change_date <= :change_date

                				AND fightersUpds.id_fighter != :id_fighter',

                'params' => array(

                        ':change_date' => $_POST['Matches']['date'],

                        ':id_fighter' => (int) $_POST['Matches']['id_home']

                ),

                'order'	=> 'change_date DESC',

                'offset'=> 0,

                'limit' => 1,

        )

		))->findAll(array(

				'select'=> 'id,name,surname,id_league',

				'condition' => 't.id_league = :id_league',

				'params' => array(':id_league' => (int) $home->id_league),

				'order'	=> 'name',

				));

		

$away = CHtml::listData($away,'id','FullName');

		

echo '<option value="">= Select Away Fighter =</option>';

foreach($away as $value=>$name)

{

	echo CHtml::tag('option',

		array('value'=>$value),CHtml::encode($name),true);

}



I solved the problem adding new column (stop_date) into the table.

is this really the only sollution ???




$away = Fighters::model()->with(array(

	'fightersUpds' => array(

		'alias'	=> 'f',

		'select'=> 'id',

		'condition' => 'f.change_date <= :change_date

					AND f.stop_date > :stop_date   // NEW COLUMN

					AND f.id_league = :id_league

              				AND f.id_fighter != :id_fighter',

		'params' => array(

					':change_date' => $_POST['Matches']['date'],

					':stop_date' => $_POST['Matches']['date'],

					':id_league' => (int) $home->id_league,

					':id_fighter' => (int) $_POST['Matches']['id_home']

		))))->findAll(array(

			'select'=> 'id,name,surname,id_league',

			'order'	=> 'name',

));