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
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')
Re: [nmsinc] Option Listings with Advanced Filter?
By Dave - January 18, 2012
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.
interactivetools.com
Re: [Dave] Option Listings with Advanced Filter?
By nmsinc - January 19, 2012
Thanks for the help, it worked perfect. I also have another thread reagaring the code below that has not been answered. I need to populate a dropdown as you can see below using the Advance query; however, I receive a SQL syntax error when I use it.
<select name="company_type">
<option value="Insurance">Insurance</option>
<?php if ($CURRENT_USER['isAdmin']):?>
<option value="Independent">Independent</option>
<?php endif; ?>
</select>
Re: [nmsinc] Option Listings with Advanced Filter?
By Dave - January 19, 2012
interactivetools.com