Articles in category "tips", sorted by viewsX
Displaying 81-90 of 149 result(s).

Using sub query for doubletts

Created 3 years ago by mbTips3 comments – viewed 9,893 times – ( +1 ) – version 1.1
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

Directory independent extensions

Created 4 years ago by GOshaTips3 comments – viewed 9,845 times – ( +16 / -1 ) – version 1.1
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

An important tip when you are using CArrayDataProvider.

Created 3 years ago by sirin kTips0 comments – viewed 9,518 times – ( +8 / -1 ) – version 1.1
Yii ‘s CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an error like “ is not defined”.

Preventing CJuiTabs from hiding drop-down CMenu items

Created 4 years ago by Steve FriedlTips1 comment – viewed 9,482 times – ( +4 ) – version 1.1
Almost all Yii applications use CMenu at the top of each page to show options available to the user, and many include drop-down components to allow more fine-grained selection.

Shrink Yii, help your IDE and speed up copying

Created 4 years ago by dckurushinTips4 comments – viewed 9,381 times – ( +10 / -9 ) – version 1.1
In this little tip, I will help you to cut Yii size for about half

CGridView customized CCheckBoxColumn

Created about a year ago by chandranTips2 comments – viewed 8,772 times – ( +5 ) – version 1.1
Hi friends,

Understanding series articles

Created 3 years ago by GOshaTips0 comments – viewed 8,678 times – ( +16 ) – version 1.1
Here are all wiki articles from "Understanding" series by Yii wiki contributors:

Key web server settings after installing a fresh Yii 2 basic or advanced app

Created about a year ago by Kartik VTips2 comments – viewed 8,484 times – ( +47 ) – version 2.0
So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.

mysql performance tip

Created 3 years ago by sirin kTips2 comments – viewed 8,449 times – ( +2 / -1 ) – version 1.1
When we are doing an insert of huge no.of rows into an SQL table ,Normally we will try to write separate insert quries this may lead us to a long duration of execution time and we can increase the speed of executing SQL quries by adding all the rows into a single insert query.
tags: mysql

Functional tests independing from your urlManager settings

Created 4 years ago by RusAlexTips1 comment – viewed 8,305 times – version 1.1
If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method: