You may need to upgrade the modules used in this program. When running your program with the latest module versions, I do not get the error message described above.
As for your second question, I'm not sure I understand what you are trying to do with that SQL statement:
SELECT * FROM table WHERE value = (SELECT * FROM table2 WHERE value2 = ?)
As far as I know, it is not valid SQL syntax to have
field = (LIST). You probably want
field IN (LIST).
In addition, you probably should only be selecting a single column in your subquery:
SELECT * FROM table WHERE value = (SELECT value2 FROM table2 WHERE value2 = ?)
If the statement above matches your intent, perhaps you need a join rather than a subquery:
SELECT * FROM table t, table2 t2 WHERE t.value = t2.value
If you can explain the desired effect of your SQL statement, I may be able to offer some other suggestions.
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.