Re: Web Tools

From: J J <linux2000(at)hotmail(dot)com>
To: pgsql-questions(at)postgreSQL(dot)org
Subject: Re: Web Tools
Date: 1999-04-09 17:34:16
Message-ID: 370E3A18.2F302134@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ronald L. Chichester wrote:

> Hi:
>
> I want to use PostgreSQL as a database engine for a web-based intranet
> (using Apache on Linux). Is there a repository of CGI examples that I
> could use, or are there some software tools that could take out some of
> the time and grunt work?
>
> Thanks in advance,
>
> Ron Chichester

This uses the built in "print a HTML table row" function:

#!/usr/bin/perl -w

use Pg;
use CGI;

$wp = new CGI;

$custname = uc $wp->param('custname');
print $wp->header;
print $wp->start_html(-author=>"jj");

$conn = Pg::connectdb("dbname = john");
if ($conn->status != PGRES_CONNECTION_OK) {
die("Can't connect");
}

$res = $conn->exec("select * from workorder where name like
'%$custname%'");
#fout, header, align, standard, html3, expanded, pager, fieldSep,
tableOpt, caption, ...
$res->print (STDOUT, "", "", 0, 1, 0, 0, "|", "border=1", "Customers");

print $wp->end_html;

Browse pgsql-general by date

  From Date Subject
Next Message J J 1999-04-09 17:38:17 Re: Postgresql Access with Perl and DBD::PG
Previous Message Mauro Bartolomeoli 1999-04-08 16:03:22 ERROR: ExecInitIndexScan