pagination problems...

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 10, 2012   (RSS)

By shawnpatoka - October 9, 2012

Im having some pagination problems, could someone help me out and figure out where i went wrong?

the page is shawnpatoka.com/list.php

the code is...

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php


// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/nfs/c06/h05/mnt/94791/domains/shawnpatoka.com/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."); }


list($participating, $barMetaData) = getRecords(array(
'tableName' => 'participating_bars',
'loadUploads' => true,
'allowSearch' => false,
'where' => "participating_bar = '1'"
));

list($notParticipating, $barMetaData) = getRecords(array(
'tableName' => 'participating_bars',
'perPage' => '5',
'loadUploads' => true,
'allowSearch' => false,
'where' => "participating_bar = '0'"
));

?>


and the pagination coding is...

<?php if ($notParticipating['prevPage']): ?>
<a href="<?php echo $notParticipating['prevPageLink'] ?>">&lt;&lt; prev</a>
<?php else: ?>
&lt;&lt; prev
<?php endif ?>

- page <?php echo $notParticipating['page'] ?> of <?php echo $notParticipating['totalPages'] ?> -

<?php if ($notParticipating['nextPage']): ?>
<a href="<?php echo $notParticipating['nextPageLink'] ?>">next &gt;&gt;</a>
<?php else: ?>
next &gt;&gt;
<?php endif ?>

Re: [shawnpatoka] pagination problems...

By shawnpatoka - October 10, 2012

Excellent! thank you very much for all of your help