how to filter fields

7 posts by 3 authors in: Forums > CMS Builder
Last Post: February 11, 2010   (RSS)

Re: [vyskocil] how to filter fields

By Dave - February 8, 2010

Hi vyskocil,

Try examining your records to see if they contain the values you are expecting. Comment out your 'where' line and then add this code a few lines below:

<?php showme($docRecords); ?>

Next, if that looks right, check the SQL that is being generated by temporarily adding this option:

'debugSql' => true,

Let me know if either of those help you find the problem.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] how to filter fields

By vyskocil - February 8, 2010

Hi Dave,

Thanks, I had two problems. I had renamed the table column and forgot to change the script. The second part is the like syntax was wrong.

this is what didn't work
'where' => " catagories LIKE '%\temployment forms\t%' ", )); ?>[/#000000]

This is what did work
'where' => "catagory LIKE 'employment forms' ", )); ?>

Thanks for all your help.

Re: [vyskocil] how to filter fields

By vyskocil - February 8, 2010

That didn't fix the problem like I thought. The links now show. They look identical to the links on the documents page but they don't point to the pdf files when I filter out by category

???

suggestions.

Re: [vyskocil] how to filter fields

By Chris - February 9, 2010

Hi vyskocil,

Can you please attach your full PHP source code?

Also, example URLs showing the problem and what you want the page to look like would be very helpful.
All the best,
Chris

Re: [chris] how to filter fields

By vyskocil - February 11, 2010

Hi Chris,

The problem was somewhere in the viewer code. I couldn't see anything that looked out of place but I did delete all the code on my page and recopied the viewer code. Now it works fine. So the filter portion of the code was good. just something with the view code but that was easy enought to copy and replace.

Thanks.

Re: [vyskocil] how to filter fields

By Chris - February 11, 2010

Great to hear you got everything working! :)
All the best,
Chris