Hi,
I have a CGI script(in perl) in /var/www/cgi-bin directory. I have a html user interface which accepts user input. I parse the input received in this CGI script & I get the input start/end dates(from the user input).
#!/usr/bin/perl
#!/comptel/ccacp/elink/common/6.3/perl/bin/perl
print "Content-type: text/plain", "\n\n";
$query_string=$ENV{'QUERY_STRING'};
@Input = split(/&/, $query_string);
foreach $i (@Input)
{
($parameter, $value) = split(/=/, $i);
$FORM{$parameter} = $value;
$a=$parameter.":".$FORM{$parameter}."\n";
}
$STARTDATE=$FORM{date1};
$ENDDATE=$FORM{date2};
print $STARTDATE."\n";
print $ENDDATE."\n";
My motive is to use these inputs to run a sql query & output the database results on web page, when the user clicks on "submit" button(on his html user interface).
But the below sql part is not working in my CGI script.
connstr='user/password@DB';
$account='sqlplus -s $connstr <<END
set heading off
set echo off
set feedback off
set pagesize 0
select date_time_out,order_id,error_message,customer_id from <table_na
+me)> where to_char(end_date_time,"yyyymmdd") between '0' and '888888
+88' and error_code<>0;
END
';
Could you please help?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.