I have a Multi Record section that has an index page listing articles' headlines -
http://masselsm.temporaryurl.biz/about-boating.php - which link to individual articles. The index only seems to find the first article -
http://masselsm.temporaryurl.biz/about-boatingDetail.php?Is-boating-affordable-1 - with the subsequent articles I get a "Record not found" error message; e.g.
http://masselsm.temporaryurl.biz/about-boatingDetail.php?Tips-from-the-toolbox-2.
Any suggestions, please?
Here's the code that loads the records. I've included the full code, which includes other elements that are loaded on this page, just in case there's some sort of conflict here.
======
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/masselsm/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($articlesRecords, $articlesMetaData) = getRecords(array(
'tableName' => 'articles',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$articlesRecord = @$articlesRecords[0]; // get first record
// show error message if no matching record is found
if (!$articlesRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
} // load records
list($panel_logosRecords, $panel_logosMetaData) = getRecords(array(
'tableName' => 'panel_logos',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$panel_logosRecord = @$panel_logosRecords[0]; // get first record
// show error message if no matching record is found
if (!$panel_logosRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}
// load records
list($panel_snowmobile_logosRecords, $panel_snowmobile_logosMetaData) = getRecords(array(
'tableName' => 'panel_snowmobile_logos',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$panel_snowmobile_logosRecord = @$panel_snowmobile_logosRecords[0]; // get first record
// show error message if no matching record is found
if (!$panel_snowmobile_logosRecord) {
header("HTTP/1.0 404 Not Found");
print "Record not found!";
exit;
}
?>
======
Thanks!
Nigel Gordijk
Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net