1
0
Fork 0
mirror of synced 2025-04-01 20:36:14 +03:00

added RAND orderby

This commit is contained in:
gnat 2007-04-13 19:32:29 +00:00
parent 61dc5e19c2
commit 8b95e7e719

View file

@ -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>