Sometimes we get lost trying to search by a HAS_MANY relation using CActiveRecord or CActiveDataProvider. This article is a series of drills that try to describe the practical techniques of searching by a HAS_MANY relation.
Few days ago i was playing with TCPF plugin to create a PDF files. Since i have checked few available extension and also checked some forum threads but still i dont get my expected result for PDF file.
Because Yii intends to be integrated nicely with third-party libraries, it does not define any global functions. Everything in Yii needs to be addressed with full class name or object scopes. For example, to access the current user, we need to use Yii::app()->user; to access application parameters, we need Yii::app()->params['name']; and so on. While editors like textmate can help alleviate the problem of these lengthy typings, it is worthwhile to define global shortcut functions to some commonly used method calls. They will make the application code look cleaner.
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.
It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's important to note that you should distinguish 2 different modes in the Eager Loading in Yii 1.1.x.