I agree with the posting about the table naming convention (these are in the DB, not on the OS).
I think your approach will work if you change $ladder_table_fields so that it has the datatypes (not just the field names), i.e.
my $ladder_table_fields = "player_name varchar2(30), id varchar2(9), position varchar2(30), ..."; # this would work in Oracle
Also, change
$sth->execute( $@sql_parameters );
to
$sth->execute( $ladder_table, $ladder_table_fields[0], $ladder_table_fields
1, ...
I tested something like you had where you wanted to pass in the field names as a list (array), but I couldn't get $sth->execute to see it in a list context. Passing it as individual scalars worked. Of course you give up the reusability of $sql_command, but making it reusable might be more trouble than it's worth.
Hope this helps,
jeremyh
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.