Sorry, it's me again. I hope I'm not bugging you with the questions or get the idea I don't want to figure this out on my own but I am really stuck on this one.

I took your suggestion and printed the statement and recieved

C:\Documents and Settings\Administrator\Desktop\scripts>perl form.pl SELECT engine, lable1, lable2, lable3, lable4, settings1, settings2, s +ettings3, settings4 FROM special_fields WHERE engine IN (".join(",",m +ap(->quote (), )).") AND (settings1="public" OR settings2="public" OR + settings3="public") C:\Documents and Settings\Administrator\Desktop\scripts>
I've reread it quite a few times now and I don't see anything misplaced or missing.

Of course that's assuming you meant for me to do

print qq(SELECT engine, lable4, settings1, settings2 FROM special_fiel +ds WHERE engine IN (".join(",",map($dbh->quote($_), @choices)).") AND + (settings1="public" OR settings2="public" OR settings3="public")); # removed some of the columns just to clean it up a bit
I carefully counted the open and close parens around the JOIN and all of them were there, including the last paren after public").

I also went ahead and tried again after creating the array and something looks weird about it printing out every element at once, I sort of expected it to only print one.

C:\Documents and Settings\Administrator\Desktop\scripts>perl form.pl SELECT engine, lable1,settings3, settings4 FROM special_fields WHERE e +ngine IN (".join(",",map(->quote (), red blue orange green)).") AND (settings1="public" OR settings2="public" OR settings3="public" ) C:\Documents and Settings\Administrator\Desktop\scripts>

In reply to Re^6: in, ands, ors in query (qq) by Anonymous Monk
in thread in, ands, ors in query by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.