Re: Php abstraction layers - Mailing list pgsql-general

From Hannes Dorbath
Subject Re: Php abstraction layers
Date
Msg-id 4314659d$0$13534$8fe63b2a@news.disputo.net
Whole thread Raw
Responses Re: Php abstraction layers  ("Antimon" <antimon@gmail.com>)
List pgsql-general
> In this situation, what would be the advantage of using an abstraction layer?

NONE.

PEAR::DB is one of the worst classes in PEAR and has lots of ugly code
in it. AdoDB is IMHO a bit better, but as you said yourself, there is
not a single reason why you should go through all the trouble of using
DBMS abstraction layers, if you don't need them. The whole approche of
such things is quite daft, because they abstract your DBMS API, but
that's it. The different SQL implementations are not portable, not to
mention pl/xxx functions, triggers, rules etc. Such things are usually
advertised by users of stupid storage engines like MySQL, SqLite and
people with very little knowlege.

http://www.powerpostgresql.com/Downloads/database_depends_public.swf

Though it might be a good idea to write yourself a set of functions /
classes to handle escaping of data and make your DBMS work easier.

To prevent SQL injections in PHP5.1, take a look at pg_query_params().


Best regards,
Hannes Dorbath

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Cursor declaration
Next
From: Greg Stark
Date:
Subject: Re: update functions locking tables