I am trying to allow this reporting feature we have to allow for people to create their own queries, and it output in the GUI. I have the front end setup, and the report side to produce results.
What the gui does is allow people to drag columns from the right to the left "textarea" and sort them in a way they want it to be displayed. So for instance, if a user select these columns (in this order):
column3 column2 column1
the params passed to the perl script look like this:
../cgi-bin/script.pl?column3=1&column2=2&column1=3
So now when I start going thru to check and see which parameters, what's the best way to check the order the columns should be put in the select statement, and to make sure there is no comma between the last column and the FROM TABLE_NAME part.
On top of that, I was thinking of some way to use the XML::Generator to dynamically have it create formatted XML. I have it when it's static amount of columns, but sometimes they may only use 3, but sometimes they may call 10 columns, etc...
here is some static XML::Generator usage:
push @output,
$xml->cdr(
$xml->GC_ID($gc_id),
$xml->Date($cdr_day),
$xml->CallStatus($call_status),
$xml->Direction($direction),
$xml->State($state),
$xml->PDD($pdd),
$xml->NOACPN($noacpn),
$xml->I_REL_CAUSE($i_cause)
);
Please provide any help or ideas, It's not apparent how I would do this. Thanks!
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.