Re: INSERT OR UPDATE? - Mailing list pgsql-general

From andrew
Subject Re: INSERT OR UPDATE?
Date
Msg-id 1128840481.850949.55120@o13g2000cwo.googlegroups.com
Whole thread Raw
In response to INSERT OR UPDATE?  (smorrey@gmail.com)
Responses Re: INSERT OR UPDATE?
List 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.


pgsql-general by date:

Previous
From: smorrey@gmail.com
Date:
Subject: INSERT OR UPDATE?
Next
From: "shakahshakah@gmail.com"
Date:
Subject: Re: INSERT OR UPDATE?