Record Not Found on some pages
7 posts by 5 authors in: Forums > CMS Builder
Last Post: March 3, 2009 (RSS)
By Izadorra - March 1, 2009
http://nancycarleton.com/praiseList.php?page=1 Copyright shows up fine
http://nancycarleton.com/praiseList.php?page=2
and after "No Record Found"
<?php
require_once "/hermes/web01/b2486/pow.nancycarleton/htdocs/cmsAdmin/lib/viewer_functions.php";
list($copyrightRecords, $copyrightMetaData) = getRecords(array(
'tableName' => 'copyright',
'where' => whereRecordNumberInUrl(1),
'loadUploads' => '0',
'limit' => '1',
'allowSearch' => 'false',
));
$copyrightRecord = @$copyrightRecords[0]; // get first record
?>
<?php echo $copyrightRecord['content'] ?><br/>
<?php if (!$copyrightRecord): ?>
No record found!<br/><br/>
<?php endif ?>
Re: [Izadorra] Record Not Found on some pages
By Kenny - March 2, 2009 - edited: March 2, 2009
Let me know if that works.
Kenny
Re: [Izadorra] Record Not Found on some pages
By rebjr - March 2, 2009
<p>Copyright © <?php echo(date("Y")); ?> Nancy Carleton. All rights reserved.</p>
Re: [Izadorra] Record Not Found on some pages
By ross - March 2, 2009
I am thinking that rebjr suggestion might actually be the easiest to use as you it will keep the copyright up to date automatically.
If you wanted to have it so you can change it in CMS Builder yourself, we'll have to go over the code on your page in more detail. I suspect that you already have another bit of viewer code on all these pages and we'll need to adjust the one a bit specifically for the copyright message.
Let me know what you think and we'll go from there.
Thanks!
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/
Re: [Izadorra] Record Not Found on some pages
By Dave - March 2, 2009
My guess is it's loading the wrong record number from the url. Try this instead (I removed the where):
list($copyrightRecords, $copyrightMetaData) = getRecords(array(
'tableName' => 'copyright',
'loadUploads' => '0',
'limit' => '1',
'allowSearch' => 'false',
));
$copyrightRecord = @$copyrightRecords[0]; // get first record
That will load the first record from copyright and ignore the record number in the url and ignore any search terms. Let me know if that works for you.
interactivetools.com
Re: [rebjr] Record Not Found on some pages
By Izadorra - March 3, 2009
Re: [Dave] Record Not Found on some pages
By Izadorra - March 3, 2009