Commit 8b95e7e7 authored by gnat's avatar gnat

added RAND orderby

parent 61dc5e19
......@@ -19,4 +19,7 @@ $users = $q->from('User u')->leftJoin('u.Email e')->orderby('e.address');
$users = $q->from('User u')->leftJoin('u.Email e')
->addOrderby('u.name')->addOrderby('e.address');
// grab randomly 10 users
$users = $q->select('u.*, RAND() rand')->from('User u')->limit(10)->orderby('rand DESC');
</code>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment