Selecting Records from Tabbed data

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 30, 2010   (RSS)

By theclicklab - June 29, 2010

Hi there,

I have an issue where I'm only getting back some of the records that I need to display. I'm selecting from a field which has tabbed values in it like this:

" 1 11 10 "

and my where clause is only bringing back anything which starts with the right number:

$destNum = $destinationsRecord['num'];
if (!$destNum) { $destNum = 1; } // default num
list($yachtsRecords, $yachtsMetaData) = getRecords(array(
'tableName' => 'yachts',
'allowSearch' => '0',
'where' => "destinations IN ($destNum)" . ' AND active ="1"' . ' AND hide ="0"',
'useSeoUrls' => true,
'debugSql' =>'true',
));


What do I need to do with my where clause for this to work?

Many thanks!

Re: [Jason] Selecting Records from Tabbed data

By theclicklab - June 30, 2010

Awesome thanks, that worked a treat!