[HOWTO] SQL for Multivalue check box

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

Re: [richb] [HOWTO] SQL for Multivalue check box

By Dave - November 19, 2009

Hi richb,

They're tab characters. Try this:

$sql = " zip LIKE '\t76016\t' ";

Let me know if that works for you!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] [HOWTO] SQL for Multivalue check box

By richb - November 19, 2009

Dave this works. I also used this as well.

$sql = "zip LIKE "%\t76016\t%"

you see any issue using % wild card?

Re: [richb] [HOWTO] SQL for Multivalue check box

By Dave - November 19, 2009

Ahh yes, I missed that. You need the wildcard if you want to match any records that have more than just that one zip selected:

$sql = " zip LIKE '%\t76016\t%' ";
Dave Edis - Senior Developer
interactivetools.com