php - Yii $criteria->addBetweenCondition not Working in CDbCriteria -
i want results of sender score between 1 10,so have add condtion.
$criteria->addbetweencondition('sender_score',$_get['senderscore_start'],$_get['senderscore_end']);
sender_score
table field, senderscore_start , senderscore_end public variables.
my search 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 @ please! what's wrong code. `
try this!
$criteria->addbetweencondition('sender_score',$_get['ipmanager']['senderscore_start'],$_get['ipmanager']['senderscore_end']);
Comments
Post a Comment