Re: database abstraction layer
| From: | Paul M Foster | Date: | Tue, 02 Feb 2010 21:06:07 +0000 |
| Subject: | Re: database abstraction layer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-301746@lists.php.net to get a copy of this message | ||
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