if(is_array($LISTIDS) && count($LISTIDS)) $where.=' AND a.id IN ('.implode(',',$LISTIDS).')';
if(is_array($LISTIDS)) $where.=' AND a.id IN ('.implode(',',$LISTIDS).')';