Posted 28 January 2013 - 12:38 AM
I am new in yii framework. I came across this code.
$param = Yii::app()->request->getParam('param');
can anyone explain what getparam('param') and $this->render() do?
and where this 'param' variable coming from?
Thankyou in advance...
Posted 28 January 2013 - 01:25 AM
This part of code is about $_GET. it checks and gets the value for param if it is there in the query string.
this part of code render's i.e. give the output of the code to a view.
Posted 28 January 2013 - 02:10 AM
but where can i find 'param' variable. Actually this code is in actionask() in fcontroller.php.
And i have a model question.php which have attributes qid,question(text),instituteid(int).
i have to view the question in index.php.
so where the condition is specified like (where(instituteid ==5))?
Posted 28 January 2013 - 02:44 AM
moreover, here param is just for demonstration.
we can have it as
then we can get value of a in site/question action as