in reply to Re^6: CGI-SQL Query Issue
in thread CGI-SQL Query Issue
Create a file called dual.sql in cgi-bin with these 2 lines
select SYSDATE from dual; exit;
Create and access this cgi program
poj#!/usr/bin/perl use strict; use warnings; use CGI; use CGI::Carp 'fatalsToBrowser'; my $sqlfile = '/var/www/cgi-bin/dual.sql'; my $q = new CGI; my $connstr = 'USER/PASSWORD@DB'; my $msg = qx"sqlplus -s $connstr \@$sqlfile"; print $q->header,$q->start_html, $q->pre($msg),$q->end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: CGI-SQL Query Issue
by Anonymous Monk on Mar 18, 2016 at 15:22 UTC | |
by Anonymous Monk on Mar 18, 2016 at 15:25 UTC | |
by Mr. Muskrat (Canon) on Mar 18, 2016 at 15:36 UTC | |
by Anonymous Monk on Mar 18, 2016 at 15:55 UTC | |
by Corion (Patriarch) on Mar 18, 2016 at 16:03 UTC | |
| |
by poj (Abbot) on Mar 18, 2016 at 16:28 UTC | |
|