[UPDATE] sorting by count

This commit is contained in:
iAmShorty 2014-02-24 10:56:47 +01:00
parent 37b8d5a56b
commit d419b1f0ff

View File

@ -156,6 +156,7 @@ class User extends Base {
LEFT JOIN " . $this->getTableName() . " AS a
ON a.id = i.account_id
GROUP BY i.account_id
ORDER BY invitationcount ASC
LIMIT ?");
if ($this->checkStmt($stmt) && $stmt->bind_param("i", $limit) && $stmt->execute() && $result = $stmt->get_result()) {
return $result->fetch_all(MYSQLI_ASSOC);