On Mar 21, 7:12 pm, John Siracusa <
sirac...@gmail.com> wrote:
> On Wed, Mar 21, 2012 at 7:00 PM, Philip Garrett <
philg...@gmail.com> wrote:
> > Is it possible to accomplish something similar with the sort_by
> > clause? I want to use a placeholder in sort_by, but RDBO interprets:
> > sort_by => [ \'some_func(?)' => 5 ]
> > as
> > ORDER BY some_func(?), t1.5
>
> No, bind values are not supported in sort_by. (Are they supported in
> many DBD::* modules?)
Yes, I think they're supported in most DBDs. I know mysql and Oracle
for sure. Probably Postgres, too.
To be clear, I am not trying to put a column name in the placeholder.
I am trying to pass an argument to a function, or really just replace
any literal value, for example:
select * from product
where match(description) against (? in boolean mode)
order by match(description) against (? in boolean mode) desc
- Philip