Re: [PHP] database abstraction layer

[email protected] (Paul M Foster)
Newsgroups php.general
Message-ID <[email protected]>
On Tue, Feb 02, 2010 at 09:23:47PM +0100, Lars Nielsen wrote:

> Hi List
> 
> I am trying to make a Database Abstraction Layer so I can which the DB
> of my application between MySQL and Postgresql. I have been looking at
> the way phpBB does it, and it seems that it is only then php-functions
> which are different. The SQL seems to be the same.
> 
> Is it save to assume that I can use the same SQL, or should i make some
> exceptions?
> 
> Regards
> Lars Nielsen

Quote of values is different between PostgreSQL and MySQL. I would
suggest you do a wrapper class around the PDO classes, which will take
care of quoting, etc.

Paul

-- 
Paul M. Foster
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.