using HTML tabular output

From: Murat Balkas <balkas(at)tel-soft(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: using HTML tabular output
Date: 1999-01-05 09:36:28
Message-ID: Pine.SO4.4.05.9901051121210.1493-100000@sparc4_20
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


Hi,
I'm trying to design a web page which will show the results of a query. I
think, using HTML tabular output would be nice. But I don't know how to
change the output style from pgtclsh.

My environment :

I'm using postgresql 6.4, cgi.tcl-0.7 from Libes, and pgtclsh. I can use
all tcl commands. I need help on getting the result of a query in HTML
output. So :

set conn [pg_connect $databasename]
set query "select * from services;"
set r [ pg_exec $conn $query]
set r1 [ pg_result -getTuple 0]

Here, $r1 should be in HTML format like,

<table ><caption align=high>Retrieved 2 rows * 9 fields</caption>
<tr><th align=right>seq</th><th align=left>name</th><th
align=left>subject</th><th align=left>type</th><th
align=left>urgency</th><th align=left>problem</th><th
align=right>solution</th><th align=right>comment</th><th
align=right>solver</th></tr>
...

Or I need smth. like that.

Thanks for your help.

P.S. : I'm sorry for my poor english.

Murat

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jose' Soares 1999-01-05 10:33:36 Re: [INTERFACES] How to implement referential facilities in PostgreSQL
Previous Message Dave Page 1999-01-05 08:41:12 RE: [INTERFACES] ANOTHER update of ODBC DRIVER v06-40-0002