Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks
What is wrong with the following?
my $select_1="lan1"; my $select_2="lan2"; my $all_select = $dbh->selectall_arrayref("SELECT ID,lan1,lan2,lan3,la +n FROM table WHERE LOWER($select_1) LIKE '%$Word%' OR LOWER($select_ +1) LIKE '%$Word'");
what I want is to finde entries which contain $Word in column lan1 OR in column lan2. It now finds only $Word in column lang1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SQLite select or
by erix (Prior) on Nov 18, 2013 at 17:50 UTC | |
by Anonymous Monk on Nov 18, 2013 at 18:58 UTC | |
by locked_user sundialsvc4 (Abbot) on Nov 18, 2013 at 20:08 UTC | |
|
Re: SQLite select or
by Corion (Patriarch) on Nov 18, 2013 at 15:52 UTC | |
|
Re: SQLite select or
by toolic (Bishop) on Nov 18, 2013 at 15:52 UTC | |
| |
|
Re: SQLite select or
by NetWallah (Canon) on Nov 18, 2013 at 16:36 UTC |