mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
Fix #131
(cherry picked from commit fcff820858dca3e8d2692e9bfee27ea89c8b9727)
This commit is contained in:
parent
722264a083
commit
de1d6b9629
@ -143,8 +143,20 @@ if(isset($_POST['town']) && isset($_POST['state']) && isset($_POST['order']) &&
|
||||
if($type == 'guildhalls' && !$db->hasColumn('houses', 'guild'))
|
||||
$type = 'all';
|
||||
|
||||
if(!empty($type) && $type != 'all')
|
||||
$whereby .= ' AND `guild` ' . ($type == 'guildhalls' ? '!' : '') . '= 0';
|
||||
if (!empty($type) && $type != 'all')
|
||||
{
|
||||
$guildColumn = '';
|
||||
if ($db->hasColumn('houses', 'guild')) {
|
||||
$guildColumn = 'guild';
|
||||
}
|
||||
else if ($db->hasColumn('houses', 'guildid')) {
|
||||
$guildColumn = 'guildid';
|
||||
}
|
||||
|
||||
if($guildColumn !== '') {
|
||||
$whereby .= ' AND `' . $guildColumn . '` ' . ($type == 'guildhalls' ? '!' : '') . '= 0';
|
||||
}
|
||||
}
|
||||
|
||||
$houses_info = $db->query('SELECT * FROM `houses` WHERE ' . $whereby. ' ORDER BY ' . $orderby);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user