views:

540

answers:

4

Almost all of free web hosting server,

you can not use PDO + MySQL.

They lack PDO drivers.

So I am considering to select

pear MDB2,

or DB_DataObject.

Which do you reccomend to me?

Give me your opinions!

A: 

I've used MDB2 quite a bit but have found the built-in mysqli functions to be fast and easy-to-use, plus they can integrate easily into a roll-your-own db abstraction layer.

jonstjohn
+1  A: 

I would actually recommend using the Mysqli functions if you can. They are fast, well-documented and well supported by the php community at large.

If you are looking for a more robust database abstraction layer, I would first suggest that you look at any of the excellent library's out there like DataMapper, or Propel or Doctrine, or even using the necessary portions of a framework like Zend. As further note, I've used Adodb in the past, but haven't seen much support for it recently.

Noah Goodrich
A: 

ADOdb is also good.

raspi
A: 

DB_DataObject depends on MDB2, so you have to have it anyway.

The question is : do you need just bare database independence or more advanced ORM (that's DB_DataObject).

I'd suggest you stick with MDB2 since you seem confused about this stuff.

slim