Hello
When using SQLite directly I used
SELECT word FROM words ORDER BY RANDOM() LIMIT 10;
to get 10 random words from a database.
I am trying to do the same query using DBIx::Class, but not sure what
to set as order_by clause:
my @words = $schema->resultset('Word')->search(undef,
{rows => $LIMIT,
order_by => ...????
columns =>
['word']});
Thanks in advance,
ambs
--
Alberto Simões
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]