Wiki

Articles tagged with "database", sorted by viewsX
Displaying 11-20 of 21 result(s).

Sub-domains with different databases in Yii!

Created 5 years ago by jwerdHow-tos5 comments – viewed 15,383 times – ( +2 ) – version 1.1
Sub-domains with different databases in Yii!

How to catch and log MySQL deadlock errors

Created 4 years ago by sebTips1 comment – viewed 11,681 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

CRUD operation in Yii framework

Created 2 years ago by Mohammad FareedTutorials4 comments – viewed 11,486 times – ( +1 / -6 ) – version all
Simple Yii Script for performing CRUD operations:

Getting nulls from database instead of empty strings

Created 5 years ago by samdarkTips2 comments – viewed 11,305 times – ( +13 ) – version 1.1
To get null from database instead of empty strings you need to set up your DB connection as follows:
tags: database, null

Application-driven database with CDbMigration and an extended CActiveRecord

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

How to avoid a database update if the ActiveRecord was not modified

Created 2 years ago by tomvdpHow-tos0 comments – viewed 8,634 times – ( +1 ) – version 1.1
The classic Yii way for doing an update action is as follows:

Multi Data Provider

Created 2 years ago by Sharon LavieTips0 comments – viewed 8,045 times – ( +1 ) – version 1.1
Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

How to store array/widget configuration to the database with config validation rules

Created 2 years ago by Kartik VTutorials0 comments – viewed 5,847 times – ( +39 / -4 ) – version 2.0
You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:

Generate CTreeview from database table and update a model

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 5,297 times – ( +1 ) – version 1.1
Suppose we want to set a category to product (or an item in general term), Also suppose categories has sub-categories (multi-level)

Active Record snapshotting (Model data base history)

Created about a year ago by BizleyTutorials3 comments – viewed 5,130 times – ( +2 ) – version 1.1
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.