Only select extra stars if they aren't empty

This commit is contained in:
Travis Burtrum 2014-02-10 00:27:47 -06:00
parent 3530a8b58b
commit 190a6f20c4

View File

@ -1018,7 +1018,7 @@ function loadMemberData($users, $is_name = false, $set = 'normal')
SELECT mem.id_member, mg.stars SELECT mem.id_member, mg.stars
FROM {db_prefix}membergroups AS mg, {db_prefix}members AS mem FROM {db_prefix}membergroups AS mg, {db_prefix}members AS mem
WHERE (FIND_IN_SET(mg.id_group, mem.additional_groups) OR ( mg.id_group=mem.id_post_group AND mem.id_group != 0 )) WHERE (FIND_IN_SET(mg.id_group, mem.additional_groups) OR ( mg.id_group=mem.id_post_group AND mem.id_group != 0 ))
AND mg.showAddBadge=1 AND mg.showAddBadge=1 AND mg.stars != \'\'
AND id_member' . (count($new_loaded_ids) == 1 ? ' = {int:loaded_ids}' : ' IN ({array_int:loaded_ids})'), AND id_member' . (count($new_loaded_ids) == 1 ? ' = {int:loaded_ids}' : ' IN ({array_int:loaded_ids})'),
array( array(
'loaded_ids' => count($new_loaded_ids) == 1 ? $new_loaded_ids[0] : $new_loaded_ids, 'loaded_ids' => count($new_loaded_ids) == 1 ? $new_loaded_ids[0] : $new_loaded_ids,