Re: INSERT OR UPDATE?

From: "andrew" <nilsandrey(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: INSERT OR UPDATE?
Date: 2005-10-09 06:48:01
Message-ID: 1128840481.850949.55120@o13g2000cwo.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think is almost the same that in many other languages, and like in
many other with the time you can have function's libraries, or more
likely class libraries with the usefull stuff.

In desktop programming environments you have components, here you have
classes that are the same thing using it in another way. :) Watch out
the new auto-includes from PHP5 classes.

There are scripts with differents approaches, you can select one or
build your own for multiple proyects.
Personally I preffer not to build the SQL code in PHP. I allways have
the queries in XML files with an specific format I chose, to describe a
SQL Query with parameters. A class to handle the query can "tell me"
about the parameters or simply "receive" the parameters, build and
execute the query, and return the results or making it browseable
(recordset).

A very usual and smart approach is to use clases in PEAR::DB.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gordon Burditt 2005-10-09 06:52:36 Re: INSERT OR UPDATE?
Previous Message Oliver Elphick 2005-10-09 06:24:51 Re: brain-teaser with CONSTRAINT - any SQL experts?