Another "where" question.

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

By Toledoh - June 19, 2012



Hi Guys,

How do I achieve this? I want to show all items that are associated to the current applicationsRecord. Currently, it's "equals" not "LIKE" ... know what I mean?

<?php

// load record from 'applications'
list($applicationsRecords, $applicationsMetaData) = getRecords(array(
'tableName' => 'applications',
'where' => whereRecordNumberInUrl(0),
'loadUploads' => true,
'allowSearch' => false,
'limit' => '1',
));
$applicationsRecord = @$applicationsRecords[0]; // get first record

// load records from 'items'
list($itemsRecords, $itemsMetaData) = getRecords(array(
'tableName' => 'items',
'where' => "application_group =".intval($applicationsRecord['num']),
'loadUploads' => true,
'allowSearch' => false,
));

?>

Cheers,

Tim (toledoh.com.au)

Re: [Chris] Another "where" question.

By Toledoh - June 19, 2012

Thanks Chris!
Cheers,

Tim (toledoh.com.au)