in reply to Re^5: in, ands, ors in query (qq)
in thread in, ands, ors in query
I took your suggestion and printed the statement and recieved
I've reread it quite a few times now and I don't see anything misplaced or missing.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>
Of course that's assuming you meant for me to do
I carefully counted the open and close parens around the JOIN and all of them were there, including the last paren after public").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 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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: in, ands, ors in query (qq)
by tye (Sage) on Dec 13, 2006 at 04:57 UTC |