David,
If you haven't already, take a look at OpenACS (http://www.openacs.org).
Basically, the way you do this is to load the Postgresql driver for AOLserver,
and use the ns_db commands to connect to the database. Even if you don't want to use the OpenACS package (it's quite
large,and may be more than you need), there is a file of utility tcl functions which will make coding this a lot
easier.
For example, if I want to do a SELECT query and load it into a <ul> on a web page, I could do it something like this:
set db [ns_db gethandle]
set my_query "select field1, field2 from my_table"
set return_string "<ul>\n"
set selection [ns_db select $db $my_query]
while { [ns_db getrow $db $selection] } {
set_variables_after_query
append return_string "<li>$field1, $field2\n"
}
HTH,
Jacques Williams
On Mon, Jul 31, 2000 at 08:03:52PM -0400, David Lloyd-Jones wrote:
> I need to present the contents of a Postgresql database (the results of
> SELECT and other commands) to a Web Browser page as presented by AOLserver.
>
> Last night I made a number of good forms with your gerat software, but at
> the end of it all they seemed to be in the form of tables within a database.
> My question is: where are these to be found in the form of .tcl files?
>
> If they exist as .tcl files, can I then export them as data, to be included
> in .adp or .asp (like .html) browser pages?
>
> * * *
>
> If this is not possible, what is the best format for presenting the results
> of SQL queries to the WWW?
>
> -dlj.
>
>
>
>
>