tags:

views:

273

answers:

3

I've bounced around between different wrappers, my own, and using straight php mysql functions over the years but I'm sure there's a really good solution out there. What is it? :)

EDIT: Only needs to connect to MYSQL.

+2  A: 

A very subjective question, can you prioritise your requirements... does it have to be light weight, portable (to other DBs) etc?

I usually use ADODB, not least because it provides great database abstraction and therefore very portable.

ILMV
+1  A: 

I use PDO with my own wrapper. Earlier i used goBD for MySQL (extends MySQLi), but all docs are only in russian.

Dmitry Merkushin
Same here - PDO with own wrapper. And it doesn't really matter if it's MySQL, PostgreSQL, SQLite, MS SQL or Oracle - PDO can handle all of them, so it's possible to write a generic wrapper.
binaryLV
+1  A: 

For larger projects I usually use Doctrine as an object relational mapper. It also provides abstraction for "normal" SQL queries but it can do so much more.

It can definitely make development much more painless. In the end you can develop complex applications without a single line of SQL code.

For small scripts where Doctrine would be just overkill, I just stick with PHPs built in PDO.

Techpriester