public function run() { $search = new SearchForm(); $controller = $this->getController(); $controller->layout = 'form'; $model = adjektive::model(); $criteria = new CDbCriteria(); //$criteria->select='kiswahili'; // SELECT Clause $condition = ''; $criteria->condition = $condition; $models = adjektive::model()->findAll($criteria); $controller->render('search', array('models' => $models)); }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the primary key value. Defaults to null, meaning using the 'id' GET variable */ public function loadadjektive($id = null) { if ($this->_model === null) { if ($id !== null || isset($_GET['id'])) { $this->_model = adjektive::model()->findbyPk($id !== null ? $id : $_GET['id']); } if ($this->_model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } } return $this->_model; }