Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to select limited rows randomly in DBIx::Class?

by duelafn (Parson)
on Jan 29, 2015 at 02:20 UTC ( [id://1114851]=note: print w/replies, xml ) Need Help??


in reply to How to select limited rows randomly in DBIx::Class?

See also Helper::ResultSet::Random which would (I believe) give the lovely syntax:

my @tickers = $schema->resultset( 'TickerTable' )->rand(20)->search({} +, { columns => ['DisplayName'] });

Good Day,
    Dean

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1114851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-29 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found