'Where' clauses syntax problem

4 posts by 4 authors in: Forums > CMS Builder
Last Post: October 30, 2008   (RSS)

Re: [benedict] 'Where' clauses syntax problem

By Perchpole - October 29, 2008

Hi, Benedict -

I'm no expert but I think your "where" code is too complex. Try this...

[font "Verdana"] [font "Verdana"]'where' => 'area_of_interest = "Hospitality"' && 'course_type = "VCE VET Course"',


:0)

Perchpole

Re: [benedict] 'Where' clauses syntax problem

By _kate_ - October 29, 2008

Could it be your placement of quotation marks?

Here's how yours are compared to examples of this type given in other threads:

'where' => 'area_of_interest = "Hospitality"',

'where' => " myfield = 'community' ",

Re: [benedict] 'Where' clauses syntax problem

By Dave - October 30, 2008

Hi benedict,

Are the area_of_interest or course_type fields multiselect fields? If so they might be padded with tab \t characters which is why they're not matching.

In any case, have a closer look at the data, either by removing the where or looking in phpMyAdmin. Something isn't matching quite right.

Try this more broad query that will match "Hospitality" anywhere in the content:

'where' => ' area_of_interest LIKE "%Hospitality%" ',

Let me know the results.
Dave Edis - Senior Developer
interactivetools.com