Created
January 15, 2014 09:54
-
-
Save kolyadin/8433617 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getUsersByCity($cityId, $from = 0, $count = -1){ | |
$sql = <<<SQL | |
select | |
user.* | |
from | |
pn_users user | |
join pn_users_info info on (info.id = user.userInfo) | |
where | |
info.cityId = :cityId | |
order by | |
user.rating desc | |
SQL; | |
return MMC::getSet(md5(__METHOD__ . serialize(func_get_args())),strtotime('+1 month'),function() use($sql,$cityId,$from,$count){ | |
return $this->fetchAll($sql . $this->getLimitString($from, $count), | |
[':cityId' => $cityId] | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment