Yii Loadmodel

public function actionUpdate($id)


$umodel	=	User::model()->findByPk($this->id); 








			return $model;







What the heck is that? :blink:

echo 'Welcome to the forum.';

if ($question+$code){

    echo $answer


(If you will post a question and not only the code, be sure you will receive an answer.)

Parse error: syntax error :P

$question = 0;

$code = 1;

but $question+$code = 1;


Anyway, maybe this is what is needed:

public function loadModel($id)


    $model = Category::model()->findByPk($id);

    if ($model===null) {

        throw new CHttpException(404, 'The requested page does not exist.');


    return $model;


(this is standard Gii code)