Filter by record with multiple recorded value

4 posts by 2 authors in: Forums > CMS Builder
Last Post: August 31, 2011   (RSS)

By ht1080z - August 29, 2011 - edited: August 31, 2011


I have created multiple datafield through category table PROCAT onto the record PROOR. (example: a1,a2,a4) and i need to filter on 4 difference PHP pages, the string that you can see below, look WHERE below.

'where' => "proor = 'a2'", {{only, but not other recorded values}}

but in every page only the selected records from the same table.

$libraryPath = 'cmsact/lib/viewer_functions.php';
$dirsToCheck = array('/home/acqua/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

list($productsRecords, $productsMetaData) = getRecords(array(
'tableName' => 'products',
'where' => "proor = 'a2'",

list($houseRecords, $houseMetaData) = getRecords(array(
'tableName' => 'house_comm',
$houseRecord = @$houseRecords[0];

list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',

Please advise,

Re: [robin] Filter by record with multiple recorded value

By ht1080z - August 31, 2011

Hi Robin,

I also find Dave's answer on this in the topic:;search_string=multi-value%20field;t=search_engine#87794

so i changed:

'where' => "proor LIKE '%\ta2\2%'",
'where' => "proor LIKE '%\ta2\t%'",
and worked perfectly.

Thank you for your support on this!

Re: [ht1080z] Filter by record with multiple recorded value

By robin - August 31, 2011

Hey, I'm glad it worked out for you even with my typo.