/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static function getRandomUsers($num=1){ $c = new Criteria(); $c->addAscendingOrderByColumn('rand()'); $c->setLimit($num); $users = UserPeer::doSelect($c); return $users; }
URL: http://snipplr.com/developer/