in reply to Re: in, ands, ors in query
in thread in, ands, ors in query
I did try to put parenthesis around the AND but now nothing is pulled back from the database. I know without a doubt that @choices containes the engine's names properly but with the parenthesis, nothing mathches. Without it, everything that has settings1-4 to "public" load.
my $data = qq(SELECT engine, name1, name2, name3, name4, lable1, l +able2, lable3, lable4, settings1, settings2, settings3, settings4 FROM special_fields WHERE engin +e IN (".join(",",map($dbh->quote($_), @choices)).") AND settings1="public" OR settings2="public" OR settings +3="public" OR settings4="public");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: in, ands, ors in query (qq)
by tye (Sage) on Dec 13, 2006 at 01:44 UTC | |
by Anonymous Monk on Dec 13, 2006 at 03:18 UTC | |
by tye (Sage) on Dec 13, 2006 at 03:29 UTC | |
by Anonymous Monk on Dec 13, 2006 at 04:21 UTC | |
by tye (Sage) on Dec 13, 2006 at 04:57 UTC | |
|
Re^3: in, ands, ors in query
by chromatic (Archbishop) on Dec 13, 2006 at 01:44 UTC |