Wiki

Sorted by viewsX
Displaying 431-440 of 688 result(s).

How to catch and log MySQL deadlock errors

Created 2 years ago by sebTips1 comment – viewed 8,266 times – ( +4 ) – version 1.1
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.
tags: database

Application-driven database with CDbMigration and an extended CActiveRecord

Created 2 years ago by Tudor IlisoiOthers0 comments – viewed 8,211 times – ( +8 ) – version 1.1
This is an incipient implementation of application-driven database with Yii.
tags: database, model

Our WebApp that will run without downtime during update/upgrade

Created 3 years ago by Pinoy CoderzTutorials3 comments – viewed 8,206 times – ( +8 / -2 ) – version 1.1
How many of us wonder how we can upgrade the website without hurting the operation of our WebApp?
tags: tutorial

Using the jamselect widget with min and max values

Created 3 years ago by got 2 doodleHow-tos0 comments – viewed 8,075 times – ( +2 ) – version 1.1
I needed to have users select from a list of keywords, in this example they must select at least two keywords but they cannot select more than six.

Facebook DeAuthorize callback URL and its response data.

Created about a year ago by sirin kTutorials1 comment – viewed 8,069 times – ( +3 ) – version 1.1
Facebook Deauthorize callback is used to getting notification to the app owner when a user uninstall our app from their fan page or profile.
tags: facebook

ISA hierarchy of tables inside a database and how to implement a single form

Created 3 years ago by pligorHow-tos2 comments – viewed 8,069 times – ( +1 ) – version 1.1
Please consider the following Dear software engineers imagine I have a simple ISA hierarchy: parent A with children B and C. So let's say we have the corresponding tables named "a", "b", "c" and (created with the help of the gii model creator) the classes A, B, C The following is a screenshot from MySQL workbench:

How to use bizRules in standard accessControl filter

Created about a year ago by redguyHow-tos8 comments – viewed 8,021 times – ( +3 ) – version 1.1
I assume you are familiar with accessControl standard filter. It allows you to separate privileges to run some action from action code itself. There is however one problem with most common usage - you cannot use bizRules, at least based on some parameters passed to 'checkAccess' just because it is hard to pass them in accessRules() result.

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created about a year ago by BoazHow-tos2 comments – viewed 7,959 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Yet another implementation of CPhpAuthManager.

Created about a year ago by seenivasanHow-tos3 comments – viewed 7,943 times – ( +8 / -1 ) – version 1.1
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at main application level to controller level. This way we have pulverised auth data for entire site into smaller units. Finally we are going to look at couple of examples.

Alternative folder structure for a standard Yii app

Created about a year ago by TrejderHow-tos4 comments – viewed 7,880 times – ( +5 ) – version 1.1
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.