List Viewer Question

2 posts by 2 authors in: Forums > CMS Builder
Last Post: December 16, 2010   (RSS)

Re: [4cdg] List Viewer Question

By Jason - December 16, 2010

Hi Clay,

Try something like this:

list($vechicleRecords,$vehicleMetaData)=getRecords(array(
'tableName' => 'vehicles',
'where' => "type='truck' OR type='car' OR type='motorcycle'",
));


In this example we'll only be returning records from the section "vehicles" that have a field "type" with a value of "truck","car", or "motorcycle".

It's important to remember that if you're checking against the value of the field "type" not it's label.

Give this a try and let me know if you run into any problems.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/