Reputation:
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!
Upvotes: 0
Views: 1549
Reputation: 6122
ADOdb is also good.
The PHP version currently supports an amazing number of databases, thanks to the wonderful ADOdb community: MySQL, PostgreSQL, Interbase, Firebird, Informix, Oracle, MS SQL, Foxpro, Access, ADO, Sybase, FrontBase, DB2, SAP DB, SQLite, Netezza, LDAP, and generic ODBC, ODBTP. The Sybase, Informix, FrontBase and PostgreSQL, Netezza, LDAP, ODBTP drivers are community contributions.
Upvotes: 0
Reputation: 21
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.
Upvotes: 0
Reputation: 25263
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.
Upvotes: 2
Reputation: 60276
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.
Upvotes: 0