getOptions method query changed to use UNION instead of IN