Exclude specific records from a list
3 posts by 2 authors in: Forums > CMS Builder
Last Post: 8 hours ago (RSS)
By mark99 - 8 hours ago
So I'm currently putting some products via a list call like this:
// load records from 'isp_list'
list($isp_listRecords, $isp_listMetaData) = getRecords(array(
'tableName' => 'isp_list',
'limit' => '5',
'loadCreatedBy' => false,
'where' => " category LIKE '%Telecoms%' ",
'allowSearch' => false,
'orderBy' => $orderByxxxxx,
));
But I'd like to specifically exclude a couple of products - using their Record Numbers (field 'num') - from being included in the list output. I'm just wondering how I do that?
By Dave - 8 hours ago
Hi Mark,
Try this:
'where' => " category LIKE '%Telecoms%' AND num NOT IN (421,83,122)",
Just replace the numbers with the ones you want to exclude.
Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com