Option Listings with Advanced Filter?

4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 19, 2012   (RSS)

By nmsinc - January 18, 2012

I'm populating a dropdown with files from another field using the advance filter. When using the code below it returns and populates every listing when I only desire those that are labled as "Insurance Dispatcher" or "Dispatcher/Adjuster" - Any suggestions - anyone?

SELECT num, fullname
FROM `<?php echo $TABLE_PREFIX ?>accounts`
WHERE `member_company_accounts` = '<?php echo $ESCAPED_FILTER_VALUE ?>' AND user_type = ('Insurance Dispatcher' || 'Insurance Dispatcher/Adjuster')
nmsinc

Re: [nmsinc] Option Listings with Advanced Filter?

By Dave - January 18, 2012

Hi nmsinc,

Try this:
SELECT num, fullname
FROM `<?php echo $TABLE_PREFIX ?>accounts`
WHERE `member_company_accounts` = '<?php echo $ESCAPED_FILTER_VALUE ?>'
AND user_type IN('Insurance Dispatcher', 'Insurance Dispatcher/Adjuster')


And see:
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_in

Hope that helps! Let me know if that works for you or if you have any other questions.
Dave Edis - Senior Developer
interactivetools.com

Re: [nmsinc] Option Listings with Advanced Filter?

By Dave - January 19, 2012

Sure, I've posted a question on the other thread and we can continue that conversation there. I'm sure we can figure something out to get it working.
Dave Edis - Senior Developer
interactivetools.com