in reply to Re: Perl Mysql DBI, using placeholders with unknown variable count
in thread Perl Mysql DBI, using placeholders with unknown variable count
is now being generated, which returns 0 rows, as status is an integer. My code for $query has been extrapolated from your elegant example as:SELECT `status`, `rma_num`, `auth_id`, `vendor`, `part_num` FROM rma_l +ist WHERE ('status') = ('0');
It seems obvious to me that my code isn't placing these quotes on the search items, so I guess DBI's substitution is. Is there a way to force this off for integer only variables? Or a different substitution character?my $query = "SELECT " . join(", ", map { $dbh->quote_identifier($_) } @q_return) . " FROM rma_list WHERE (" . join(', ', ('?') x (keys %q_search)) . ") = (" . join(', ', ('?') x @q_names) . ");";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl Mysql DBI, using placeholders with unknown variable count
by moritz (Cardinal) on Aug 18, 2009 at 10:27 UTC |