jhourcle's reply above is good for the general case... for your specific case here which appears to be a SQL problem and not a perl one, i would first debug/narrow it a little more. First, put in
print $sql; and
print join(":",@bind); debug statements (or use
DBI's
trace functionality) so you can test the sql directly in mysql. If the syntax error still isn't obvious, then try to knock the size down from 300 names to just 3 or so (i assume there's some loop-age to construct the statement so hopefully this is easy), and try to work w/the sql from there. Might be obvious once all the clutter is removed.. If it's still a problem, post it up! I'd recommend posting the smaller sample of what illustrates the issue -- even with
<readmore> tags a INSERT statement w/300 names might not get as close a look as a concise version (and hopefully the problem will be easier for a reader to spot).
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.