Articles tagged with "db", sorted by commentsX
Displaying 1-5 of 5 result(s).

How to use nested DB transactions (MySQL 5+, PostgreSQL)

Created 6 years ago by mindehHow-tos6 comments – viewed 34,052 times – ( +46 ) – version 1.1
Original source code and idea are from: PHP, PDO & Nested Transactions.

Active Record snapshotting (Model data base history)

Created 7 months ago by BizleyTutorials3 comments – viewed 3,112 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.

Configuring CWebLogRoute for DB profiling

Created 4 years ago by Igor IvanovicTutorials1 comment – viewed 20,139 times – ( +3 ) – version 1.1
/index.php /protected/config/main.php
tags: logger, profiler, db

How to nest DB transactions without actually nesting them.

Created 10 months ago by le_topHow-tos0 comments – viewed 2,415 times – ( +1 ) – version 1.1
To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.

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

Created about a year ago by Kartik VTutorials0 comments – viewed 4,162 times – ( +38 / -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: