Return to Snippet

Revision: 19656
at October 28, 2009 04:31 by saturnxxi


Initial Code
public static function getRandomUsers($num=1){
		$c = new Criteria();
		$c->addAscendingOrderByColumn('rand()');
		$c->setLimit($num);
		$users = UserPeer::doSelect($c);
		return $users;	
	}

Initial URL
http://snipplr.com/developer/

Initial Description

                                

Initial Title
Get random Objects with Propel

Initial Tags
database

Initial Language
PHP