Hi all, I always keep getting this error
Bad Request
Your request is invalid.
The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications.
If you think this is a server error, please contact the webmaster.
This is my controller code:
public function actionUpdateLang($id,$tlang)
{
$product = $this->loadModel($id);
if (!LanguageTranslated::model()->exists('langid = :langid AND lang = :lang', array(':busid'=>$id, ':lang'=>$tlang)))
throw new CHttpException (404, 'The requested target language '.$tlang.' does not exist for this language.');
$this->render('updatelang',array(
'product'=>$product,
'tlang'=>$tlang,
));
}
I dont know the problem with this code. this is my first time creating code without the help of crud generator.