I use PEAR DB to interact with databases. It is easy to set up once you have the --with-pear option on you php installation. Then you would goto your shell and type
# pear install DB
This will install pear's db package.
I find the benefits to using PEAR DB is that you can easily switch between different databases. You can use prepared statements which helps with security and ease of use.