Hello,
I really like the way Postgres's TCL API allows you to walk
the rows returned by a query. I think an AOLserver command
that used a similar syntax would be useful.
I propose a command called ``ns_dbquery'' or ``ns_db
query'' that would be used thusly:
ns_dbquery <pool name> <result set name> <query> <procedure>
So something like the following would be possible:
ns_dbquery webpool resultset "SELECT * FROM nss_passwd" {
ns_adp_puts "Row $i contains [ ns_set get $resultset pw_name ]"
incr i
}
I've written a module that implements this command. The
source can be found at:
http://www.ayan.net/software/nsdbquery/
And a demonstration page at:
http://www.ayan.net/nsdbquery.adp
Does anyone think this would be a useful addition to the API?
-ayan
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of
your email blank.