Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
Before I start creating my own solution(which will surely turn out to be inefficient): which is the standard way to reiterate the query of a sqlite database for multiple values?
my $dbh = DBI->connect( "dbi:SQLite:$our_db" ) || die "Cannot connect: + $DBI::errstr"; my $all = $dbh->selectall_arrayref("SELECT ID, value1, value2 FROM ta +ble WHERE value1 = '$query'");
$query can be a variable number of values (apple, pie, etc. it is not a fix number) I want to match in my database. The first think I can think of is to use a loop... Thank you for pointing me to the right direction.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dbi:SQLite multiple query
by erix (Prior) on Dec 30, 2015 at 11:17 UTC | |
by Anonymous Monk on Dec 30, 2015 at 12:44 UTC | |
by Corion (Patriarch) on Dec 30, 2015 at 12:53 UTC | |
by Anonymous Monk on Dec 30, 2015 at 13:08 UTC | |
|
Re: dbi:SQLite multiple query
by Discipulus (Canon) on Dec 30, 2015 at 11:19 UTC | |
|
Re: dbi:SQLite multiple query
by Your Mother (Archbishop) on Dec 30, 2015 at 16:49 UTC |