[lug] Pointers Needed for Building Web Interface for PostgreSQL

Collins Richey crichey at gmail.com
Mon Nov 27 16:05:34 MST 2006


On 11/27/06, Bill Thoen <bthoen at gisnet.com> wrote:
> I'm looking for pointers/examples on how to build a web interface to a
> PostgreSQL database residing on a Fedora Core 5 system. I don't need
> anything too involved at this point; I just want to see what's involved in
> creating a simple interface that lets authorized users view records in a
> form based view and edit certain fields.
>
> The Googlits I've found so far seem to favor PHP, but I was hoping there's
> something for Perl or even pgsql. Does anyone have any suggestions?
>

Google a little more. You will find samples in Perl or Python or PHP
or Ruby or ??? (your language of choice?). Each language has a set of
postgres functions, and except for basic language differences, they're
all the same. When it comes to database transactions, it's all sql.
There are even precious few differences for PostgreSQL, MySQL, and
Oracle when you get right down to it.

You need connect/select a database (the equivalent of opening a file
handle), build a query (SQL statements), execute the query returning a
resource handle, loop through and extract the rows returned in the
resource handle (presented as numeric arrays or associative arrays or
objects), free the resource handle, or execute insert/update/delete
quieries, repeat ad nauseam, disconnect. The spelling of the function
names and minor details differ by language and database type, but it
all looks the same.

Enjoy,



-- 
Collins Richey
     If you fill your heart with regrets of yesterday and the worries
     of tomorrow, you have no today to be thankful for.



More information about the LUG mailing list