Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function actionIndex() {
- $model=new TbState('search');
- $model->unsetAttributes();
- if(isset($_GET['TbState']))
- $model->attributes = $_GET['TbState'];
- if(isset($_GET['countryid'])
- $model->countryid = $_GET['countryid'];
- $this->render('index',array(
- 'model'=>$model,
- ));
- }
- /////////////////////////////////
- public function search() {
- // Warning: Please modify the following code to remove attributes that
- // should not be searched.
- $criteria=new CDbCriteria;
- $criteria->compare('stateid',$this->stateid);
- $criteria->compare('state',$this->state,true);
- $criteria->compare('countryid',$this->countryid);
- return new CActiveDataProvider($this, array(
- 'criteria'=>$criteria,
- ));
- }
Add Comment
Please, Sign In to add comment