->where was ignoring the bind parameters returned by ->_order_by
Revision history for SQL::Abstract
+ - Fix order clauses with bind parameters in ->where
+
revision 1.81 2014-10-25
----------------------------
- Fix overly-enthusiastic parenthesis unroller (RT#99503)
# order by?
if ($order) {
- $sql .= $self->_order_by($order);
+ my ($order_sql, @order_bind) = $self->_order_by($order);
+ $sql .= $order_sql;
+ push @bind, @order_bind;
}
return wantarray ? ($sql, @bind) : $sql;
for my $case( @cases) {
my ($stat, @bind);
- ($stat, @bind) = $sql->_order_by($case->{given});
+ ($stat, @bind) = $sql->where(undef, $case->{given});
is_same_sql_bind (
$stat,
\@bind,
$case->{bind} || [],
);
- ($stat, @bind) = $sqlq->_order_by($case->{given});
+ ($stat, @bind) = $sqlq->where(undef, $case->{given});
is_same_sql_bind (
$stat,
\@bind,