$this->buildQuery();
$token = $this->grouper->getGroupToken($this);
- $groups = XDB::fetchAllRow('SELECT ' . $token . ', COUNT(a.uid)
- ' . $this->query . '
- GROUP BY ' . $token,
- 0);
+ $groups = XDB::rawFetchAllRow('SELECT ' . $token . ', COUNT(a.uid)
+ ' . $this->query . '
+ GROUP BY ' . $token,
+ 0);
return $groups;
}
$this->buildQuery();
$token = $this->grouper->getGroupToken($this);
- $groups = XDB::fetchAllRow('SELECT ' . $token . ', COUNT(p.pid)
- ' . $this->query . '
- GROUP BY ' . $token,
- 0);
+ $groups = XDB::rawFetchAllRow('SELECT ' . $token . ', COUNT(p.pid)
+ ' . $this->query . '
+ GROUP BY ' . $token,
+ 0);
return $groups;
}
if (!empty($uids)) {
$cond = XDB::format(' AND a.uid IN {?}', $uids);
}
- $fetched = XDB::fetchColumn('SELECT SQL_CALC_FOUND_ROWS a.uid
- ' . $this->query . $cond . '
- GROUP BY a.uid
- ' . $this->orderby . '
- ' . $lim);
+ $fetched = XDB::rawFetchColumn('SELECT SQL_CALC_FOUND_ROWS a.uid
+ ' . $this->query . $cond . '
+ GROUP BY a.uid
+ ' . $this->orderby . '
+ ' . $lim);
$this->lastusercount = (int)XDB::fetchOneCell('SELECT FOUND_ROWS()');
return $fetched;
}
if (!is_null($pids)) {
$cond = XDB::format(' AND p.pid IN {?}', $pids);
}
- $fetched = XDB::fetchColumn('SELECT SQL_CALC_FOUND_ROWS p.pid
- ' . $this->query . $cond . '
- GROUP BY p.pid
- ' . $this->orderby . '
- ' . $lim);
+ $fetched = XDB::rawFetchColumn('SELECT SQL_CALC_FOUND_ROWS p.pid
+ ' . $this->query . $cond . '
+ GROUP BY p.pid
+ ' . $this->orderby . '
+ ' . $lim);
$this->lastprofilecount = (int)XDB::fetchOneCell('SELECT FOUND_ROWS()');
return $fetched;
}
{
$this->requireAccounts();
$this->buildQuery();
- $count = (int)XDB::fetchOneCell('SELECT COUNT(*)
- ' . $this->query . XDB::format(' AND a.uid = {?}', $user->id()));
+ $count = (int)XDB::rawFetchOneCell('SELECT COUNT(*)
+ ' . $this->query
+ . XDB::format(' AND a.uid = {?}', $user->id()));
return $count == 1;
}
{
$this->requireProfiles();
$this->buildQuery();
- $count = (int)XDB::fetchOneCell('SELECT COUNT(*)
- ' . $this->query . XDB::format(' AND p.pid = {?}', $profile->id()));
+ $count = (int)XDB::rawFetchOneCell('SELECT COUNT(*)
+ ' . $this->query
+ . XDB::format(' AND p.pid = {?}', $profile->id()));
return $count == 1;
}
if (is_null($this->lastusercount)) {
$this->requireAccounts();
$this->buildQuery();
- return (int)XDB::fetchOneCell('SELECT COUNT(DISTINCT a.uid)
+ return (int)XDB::rawFetchOneCell('SELECT COUNT(DISTINCT a.uid)
' . $this->query);
} else {
return $this->lastusercount;
if (is_null($this->lastprofilecount)) {
$this->requireProfiles();
$this->buildQuery();
- return (int)XDB::fetchOneCell('SELECT COUNT(DISTINCT p.pid)
+ return (int)XDB::rawFetchOneCell('SELECT COUNT(DISTINCT p.pid)
' . $this->query);
} else {
return $this->lastprofilecount;