Re: Database Code Portability
| From: | Phil Lambert | Date: | Tue, 20 Feb 2001 10:11:03 +0000 |
| Subject: | Re: Database Code Portability | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40721@lists.php.net to get a copy of this message | ||
Hi Dave,
ODBC is probably your best bet but if your working on Unix/Linux it can
be a bit of a problem as ODBC is primarily a Microsoft system. I'm working
on something like this for my final year degree project. My script's are
being developed using Postgres but the final version will use MS SQL.
There's a few ODBC systems available for Linux, but the one I used was
unixODBC (www.unixodbc.org). It works pretty well but was a bit of a swine
to setup and configure (as the documentation is incomplete). Once running
you can use the ODBC commands built into PHP which *should* make you as
database-independent as possible.
Phil
Andrew Hill <ahill@openlinksw.com> wrote in message
news:B6B41EE8.2220%ahill@openlinksw.com...
> Dave,
>
> The ODBC functions in PHP mostly address this. A good ODBC driver will
also
> translate full SQL92 functionality into the underlying dialect that the
> database supports.
>
> Let me know if you have any questions.
>
> Best regards,
> Andrew
> ---------------------------------------
> Andrew Hill - OpenLink Software
> Director Technology Evangelism
> eBusiness Infrastructure Technology
> http://www.openlinksw.com
>
>
> On 2/16/01 11:54 PM, "Dave Haggerty" <haggerty@ix.netcom.com> wrote:
>
> > I haven't seen this issue discussed, sorry if I missed it:
> >
> > My question is why are the PHP database functions so unportable? Is
there a
> > reason why they have to be specific to, say MySQL. It seems to me (even
> > though I am an amatuer to this stuff) that the code should be much more
> > easily portable from one db to another?
> >
> > Do most coders add an abstraction layer themselves? Or maybe people
just
> > don't port PHP code much and so don't worry about it?
> >
> > Mainly curious....
> >
> > Dave
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>