Yii Framework Forum: A Slight Doubt. - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

A Slight Doubt. About the CActiveDataProvider params.

#1 User is offline   Sankalp Singha 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 13-April 13

Posted 15 April 2013 - 10:15 PM

I am a complete newbie in the world of yii and doing my best to learn the framework as best as I can, while reading the book I came across :
'params'=>array(':projectId'=>$this->_project->id)
I want to know why do we use :projectId why not directly projectId? What does the ':' stand for?
I am sorry if this question sounds stupid. Any answer would be highly appreciated.
Regards.
0

#2 User is offline   Abhishek Shah 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 90
  • Joined: 20-July 12
  • Location:New Jersey,USA

Posted 16 April 2013 - 12:02 AM

In condition we are using projectId,instead of $this->_project->id,it will get projectId in condition from parameter,
& for assigning value to parameter,we have syntax like :projectId in yii.
Feel free to ask for help,
Abhishek.
Freelancer.
Yii Basic Gii With Export Pdf Excel
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users