Wiki

Articles in category "faqs", sorted by date (updated)X
Displaying 1-6 of 6 result(s).

Relations: BELONGS_TO versus HAS_ONE

Updated 8 months ago by JorgeeFAQs9 comments – viewed 66,228 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 the view rendering flow

Updated about a year ago by JorgeeFAQs16 comments – viewed 114,683 times – ( +89 / -3 ) – version 1.1
There is a lot of confusion surrounding what is happening behind the scenes when you render a view.

Understanding "Safe" Validation Rules

Updated about a year ago by GismoFAQs10 comments – viewed 63,399 times – ( +83 / -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.

Creating a parameterized LIKE query

Updated 2 years ago by AsgarothFAQs6 comments – viewed 41,897 times – ( +21 ) – 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

Updated 2 years ago by migajekFAQs2 comments – viewed 31,608 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

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

Updated 3 years ago by Steve FriedlFAQs3 comments – viewed 37,018 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