To use PEAR::DB or the PHP database functions
| From: | Merritt, Dave | Date: | Thu, 20 Mar 2003 19:56:42 +0000 |
| Subject: | To use PEAR::DB or the PHP database functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-140465@lists.php.net to get a copy of this message | ||
All,
I've always used MySQL databases and the MySQL functions in PHP for my code
in the past. However, I'm now working on a project that I want the project
to be able to be database independent so that the user of the project can
use whatever database he/she wishes. I'm looking primarily at providing
support for MySQL, PostgreSQL, Oracle, & SQL Server databases. What's the
general consensus on how to handle this? Do I need to look at using
PEAR::DB so that the type of database is "hidden" from my code or would I
look at writing different include files for each database type and each of
the include files use the relevant PHP functions? Or some other totally
different way?
Thanks
Dave Merritt
dave.merritt@arvinmeritor.com