Any ideias about how to add the searching feature to CRUD?
any know best way for query under all cols froma table in YII?
example:
CREATE TABLE IF NOT EXISTS `page` ( `page_id` int(11) NOT NULL auto_increment, `page` text NOT NULL, `description` varchar(255) NOT NULL, `user_id` int(11) NOT NULL, `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `active` tinyint(1) default '1', PRIMARY KEY (`page_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE `devm_frame`.`user` ( `user_id` INT NOT NULL , `user` VARCHAR( 255 ) NOT NULL , `password` VARCHAR( 255 ) NOT NULL , `email` VARCHAR( 255 ) NOT NULL , `active` BOOL NOT NULL , PRIMARY KEY ( `user_id` ) ) ENGINE = MYISAM
public function actionAdmin() { $this->processAdminCommand(); $criteria=new CDbCriteria; $pages=new CPagination(page::model()->count($criteria)); $pages->pageSize=self::PAGE_SIZE; $pages->applyLimit($criteria); $sort=new CSort('page'); $sort->applyOrder($criteria); $pageList=page::model()->findAll($criteria); $this->render('admin',array( 'pageList'=>$pageList, 'pages'=>$pages, 'sort'=>$sort, )); }
how to modify this to show $search keyword for query?
regards
Max