Conf/Examples/DatabseExampleDml

From AOLserver Wiki
Revision as of 09:39, 13 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 "insert into users(name,email,address) 
  values('jain','jain@qcode.co.uk','Main Road')"    
  
  set db [ns_db gethandle $pool]
  ns_db dml $db $sql
  
  ns_db releasehandle $db
 %>
 </body>
 </html>

Note

ns_db dml is normally used for INSERT, UPDATE and DELETE queries.