Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This is the sort of thing I have:
How can I alter this so that it doesn't just match exact hits?my $sth = $dbh->prepare(qq{SELECT * FROM Prediction WHERE Prediction_i +d = '$keyword' OR Target_id = '$keyword' Use = '$keyword' }); + + + $sth->execute() or die "Couldn't execute statement: " . $sth->errstr; + + + my @new_array; + + while (my $ary_ref = $sth->fetchrow_arrayref() ) { my $delim = "\n"; for (my $i=0; $i<@{$ary_ref}; $i++) { push @new_array, "$ary_ref->[$i]\n"; } print "\n"; } + + print @new_array;
Thanks
Retitled by davido.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Performing queries with DBI and DBD::MySQL
by Mutant (Priest) on Jan 10, 2005 at 16:04 UTC | |
|
Re: Performing queries with DBI and DBD::MySQL
by dbwiz (Curate) on Jan 10, 2005 at 16:18 UTC | |
|
Re: Performing queries with DBI and DBD::MySQL
by TrekNoid (Pilgrim) on Jan 10, 2005 at 16:04 UTC | |
|
Re: Performing queries with DBI and DBD::MySQL
by erix (Prior) on Jan 10, 2005 at 16:34 UTC | |
|
Re: Performing queries with DBI and DBD::MySQL
by r34d0nl1 (Pilgrim) on Jan 10, 2005 at 16:14 UTC |