Yii DAO and PDO

One doubt I have: PDO is already a layer abstraction and Yii DAO is an abstraction above PDO … why I need Yii DAO and why not just go with PDO ?

ps. I prefer to use ORM AR, but just curious about that.

Having Yii DAO on top of PDO gives us more flexibility and convenience. It also gives us chance to develop adapters to achieve features that PDO does not support. For example, in the newly added (in SVN) MSSQL support, we introduced a PDO adapter to support transaction and getLastInsertId in MSSQL.

That's understandable … i'm not experience with PDO, but when googling, results are that some people say it sucks (buggy) and some say it's heaven (super fast)

ps. again, i'm an AR guy, but curious :slight_smile:

Sohdubom, I think Yii DAO must lie on top of PDO to ease the multi DBMS support.

Qiang, my experience with PDO while working with Prado is sometimes, issue about PDO unbufferred query comes up and there is no way to overcome it. What's your opinion ?

What particular issue you have with PDO? From my knowledge, PHP is focusing to improve PDO (it should also).

Having Yii DAO has another advantage that if in future, we plan to bypass PDO, we could do it without affecting the code using Yii DAO.