Detail Page- Code for Second Record

2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 17, 2008   (RSS)

By sidcam - July 17, 2008

New to CMS Builder. Simple question I think. I want to create a Detail Page for a record other than the first record but I can't figure out what to enter into the "Where" clause or how to customize it to work. For this example the table is named "header", and the Second record has a title field named "Test".



<?php

require_once "/home/u7/sidcam/html/cmsAdmin/lib/viewer_functions.php";

list($headerRecords, $headerMetaData) = getRecords(array(
'tableName' => 'header',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$headerRecord = @$headerRecords[0]; // get first record

?>