Fix SQL error in search

This commit is contained in:
Hypolite Petovan 2018-11-17 23:48:08 -05:00
parent 4790067527
commit a828e712a3
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ class AccountTypeTabs
public function render(string $route_name, string $current_type = '', $condition = '', $values = [], array $queryParams = []): string public function render(string $route_name, string $current_type = '', $condition = '', $values = [], array $queryParams = []): string
{ {
if ($condition) { if ($condition) {
$condition .= 'AND ' . $condition; $condition = 'AND ' . $condition;
} }
$stmt = 'SELECT `account_type`, COUNT(*) AS `count` $stmt = 'SELECT `account_type`, COUNT(*) AS `count`
FROM `profile` p FROM `profile` p
JOIN `server` s ON s.`id` = p.`server_id` AND s.`available` AND NOT s.`hidden` JOIN `server` s ON s.`id` = p.`server_id` AND s.`available` AND NOT s.`hidden`