How to catch and log MySQL deadlock errors
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
Introduction
To get null from database instead of empty strings you need to set up your DB connection as follows:
Hi Friends, First I would to say sorry but I am not very familiar to magento so after a 1 week spend I will implement the magneto cron functionality on yii I hope it's may be some helpful.
At first, create a class named SmartyRenderer under application/components or any directory you want.
We can easily have a multilingual site if we put a "lang" parameter that comes via GET. For example:
PHPIDS is a well known project that can be found in php-ids.org.
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.
How to add additional information to a user when using BUM extension?
One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor th...
This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.
Hi Friends,
In this tutorial, how to update the sum of all the button data-price value using jquery,
Just Follow three step and it's work easily.I hope It may be some helpful to others.

Stores session data in database and transfer data when session is destroy. Uses for check users online, user's last activity and last ip.
Here's a tutorial on how to create a CGridView with external date filters
the trick is to create hidden columns within the CGridView Filters
something like in the example below:

I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it o...
Yesterday I've written a module for myself. Just an experiment. When I was feeling satisfied, I've created a repository on github, and pushed my code. My module and yii are on github. So I'll show you a "new" way to start our yii projects.
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model)...
If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.