'site_wide_controls', 'where' => '', // load first record 'loadUploads' => true, 'allowSearch' => false, 'limit' => '1', )); $site_wide_controlsRecord = @$site_wide_controlsRecords[0]; // get first record if (!$site_wide_controlsRecord) { dieWith404("Record not found!"); } // show error message if no record found // load record from 'listings' list($listingsRecords, $listingsMetaData) = getRecords(array( 'tableName' => 'listings', 'where' => whereRecordNumberInUrl(), 'loadUploads' => true, 'allowSearch' => false, 'limit' => '1', )); $listingsRecord = @$listingsRecords[0]; // get first record if (!$listingsRecord) { dieWith404("Record not found!"); } // show error message if no record found list($prevRecord, $nextRecord) = getPrevAndNextRecords(array( 'tableName' => 'listings', 'recordNum' => getNumberFromEndOfUrl(), )); ?>