I want to get results of sender score between 1 to 10,So I have add this condtion.
$criteria->addBetweenCondition('sender_score',$_GET['senderscore_start'],$_GET['senderscore_end']);
sender_score
is my table field, senderscore_start and senderscore_end are only public variables.
My Search From Code:
<div class="row">
<?php echo $form->label($model,'senderscore_start'); ?>
<?php echo $form->textField($model,'senderscore_start',array('size'=>60,'maxlength'=>100,'style'=>'width:300px;')); ?>
</div>
<div class="row">
<?php echo $form->label($model,'senderscore_end'); ?>
<?php echo $form->textField($model,'senderscore_end',array('size'=>60,'maxlength'=>100,'style'=>'width:300px;')); ?>
</div>
My Model Code:
public $senderscore_start;
public $senderscore_end;
array('senderscore_start,senderscore_end', 'safe', 'on'=>'search'),
$criteria->addBetweenCondition('sender_score',$_GET['senderscore_start'],$_GET['senderscore_end']);`
But not showing results between 1,10 , can you look at this please! what's wrong with my code. `