Difference between #6 and #7 of
How to use nested DB transactions (MySQL 5+, PostgreSQL)

Changes

Title unchanged

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

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

db, mysql, postgresql, transaction, nested

Content changed

Original source code and idea are from: [PHP, PDO & Nested Transactions](http://www.kennynet.co.uk/2008/12/02/php-pdo-nested-transactions/). Tested with: MySQL 5.1.30 + Yii 1.1.8. Problem: Say there is service layer in an application, and one service may use others. Now each service deals will complex business logic will needs to wrap that into transactions.

If there are services A and B here's how it might happen:

```php
class ServiceA {
[...]
41 0
26 followers
Viewed: 67 909 times
Version: 1.1
Category: How-tos
Written by: mindeh
Last updated by: Boaz
Created on: Jun 30, 2009
Last updated: 9 years ago
Update Article

Revisions

View all history