
Chris
Staff

Oct 6, 2009, 1:15 PM
Post #6 of 13
(1767 views)
Shortcut
|
|
Re: [Chris_t] news content or pdf
[In reply to]
|
Can't Post
|
|
Hi Chris, I think the problem is here:
<?php header('Content-type: text/html; charset=utf-8'); ?> <?php /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */ require_once "/home/chsm00/public_html/cmsAdmin/lib/viewer_functions.php"; list($in_the_newsRecords, $in_the_newsMetaData) = getRecords(array( 'tableName' => 'in_the_news', )); ?> <?php /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */ require_once "/home/chsm00/public_html/cmsAdmin/lib/viewer_functions.php"; list($in_the_newsRecords, $in_the_newsMetaData) = getRecords(array( 'tableName' => 'in_the_news', 'where' => whereRecordNumberInUrl(1), 'limit' => '1', )); $in_the_newsRecord = @$in_the_newsRecords[0]; // get first record // show error message if no matching record is found if (!$in_the_newsRecord) { print "Record not found!"; exit; } ?> Specifically, you're overwriting the $in_the_newsRecords variable. Initially you load in all the records (in red), then you load in the single record "whereRecordNumberInUrl" (in blue). I would suggest renaming the blue text above to $in_the_newsSelectedRecord. I hope this helps. Please let me know if you have any questions or comments. Chris
(This post was edited by chris on Oct 6, 2009, 1:15 PM)
|