Conf/Examples/DatabseExampleOneRow

From AOLserver Wiki
Revision as of 12:15, 12 January 2012 by Visitatvishal (talk | contribs) (Created page with ' part of AOL Database Configuration with PostgreSQL <html> <head><title>Testing of Database connection</title></head> <body> A simple…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

part of AOL Database Configuration with PostgreSQL

<html>
   <head><title>Testing of Database connection</title></head>
 <body>  
 A simple tcl script example of Database Configuration
 <% 
  set pool "postgres_pool"
  set sql "select * from users"    
  set db [ns_db gethandle $pool]
  
  set rec [ns_db 1row $db $sql]
  ns_puts [ns_set array $rec]
  ns_db releasehandle $db
 %>
 </body>
 </html>