[Dbix-class] Returning search results in a specific order

Peter Rabbitson rabbit+dbic at rabbit.us
Tue Apr 30 19:08:39 GMT 2013


On Tue, Apr 30, 2013 at 06:21:54PM +0000, Chris Newman wrote:
> 
> However, I cannot for the life of me figure out how to do the same thing using DBIx::Class.  My test code looks like this:
> $schema->resultset ('MyTable')->search (id => $ids, {
> order_by => \'FIND_IN_SET (id, '2, 1, 3')
> });
> 

The thing above isn't valid perl, left alone valid search() syntax. 
Please show *actual* code run and *actual* SQL produced.

Cheers



More information about the DBIx-Class mailing list