Re: Php abstraction layers

From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Php abstraction layers
Date: 2005-08-30 14:35:38
Message-ID: 4314659d$0$13534$8fe63b2a@news.disputo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2005-08-30 14:43:17 or kills performance
Previous Message Greg Stark 2005-08-30 14:35:31 Re: update functions locking tables