Wiki

Articles in category "faqs", sorted by ratingX
Displaying 1-7 of 7 result(s).

Relations: BELONGS_TO versus HAS_ONE

Created 3 years ago by Steve FriedlFAQs9 comments – viewed 78,322 times – ( +65 ) – version 1.1
It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

Understanding "Safe" Validation Rules

Created 3 years ago by Steve FriedlFAQs10 comments – viewed 72,539 times – ( +90 / -1 ) – version 1.1
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

Understanding the view rendering flow

Created 2 years ago by dckurushinFAQs16 comments – viewed 134,709 times – ( +91 / -3 ) – version 1.1
There is a lot of confusion surrounding what is happening behind the scenes when you render a view.

Creating a parameterized LIKE query

Created 3 years ago by Steve FriedlFAQs6 comments – viewed 50,246 times – ( +22 ) – version 1.1
It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

Common Yii questions

Created 2 years ago by dckurushinFAQs2 comments – viewed 33,717 times – ( +21 ) – version 1.1
Here I suggest to list the most common questions you meet in the forum or freenode irc. Feel free to edit this wiki article, and add another question with answer

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

Created 4 months ago by Kartik VFAQs0 comments – viewed 1,595 times – ( +29 / -4 ) – version 2.0
With Yii Framework 2.0, one of the many changes, that Yii 1.x developers will face is removal of all client helpers and revamp of the CClientScript functionality. For example no more CHtml::ajaxLink or Html::ajaxLink. How do you cater to such requirements in Yii 2.0?

"Why do I get a 403 error when trying to use Gii?"

Created 3 years ago by Steve FriedlFAQs3 comments – viewed 42,067 times – ( +7 ) – version 1.1
After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error:
tags: Gii, config