This is my pagination script:

 * PhpMyCoder Paginator            *
 * Created By PhpMyCoder           *
 * 2010 PhpMyCoder                 *
 * ------------------------------- *
 * You may use this code as long   *
 * as this notice stays intact and *
 * the proper credit is given to   *
 * the author.                     *
    	<title> Pagination Test - Created By PhpMyCoder</title>
        <style type="text/css">
			#nav { font: normal 13px/14px Arial, Helvetica, sans-serif; margin: 2px 0; }
			#nav a { background: #EEE; border: 1px solid #DDD; color: #000080; padding: 1px 7px; text-decoration: none; }
			#nav strong { background: #000080; border: 1px solid #DDD; color: #FFF; font-weight: normal; padding: 1px 7px; }
			#nav span { background: #FFF; border: 1px solid #DDD; color: #999; padding: 1px 7px; }
ini_set ("display_errors", "1");
			//Require the file that contains the required classes
			//PhpMyCoder Paginator
			$paginator = new pmcPagination(20, "page");
			//Connect to the database
			//Select DB

			//Select only results for today and future
$result = mysql_query("SELECT programme, channel, airdate, expiration, episode, setreminder FROM thementalistonair where expiration >= now() order by airdate;");

echo '<h1>#records: ', mysql_num_rows($result), "</h1>\n";
while($row = mysql_fetch_array($result))
				$paginator->add(new paginationData($row['programme'],
			//Show the paginated results
			$paginator->paginate ();
		?><? include("footer1.php"); ?>
			//Show the navigation

I put in three records as test data, but only three displayed.
I have 4 records in my table, displaying events that occur on the following dates
(quoted from the airdate and expiration fields of my table here):

2010-06-03 12:55:00 2010-06-03 13:55:00
2010-06-04 12:55:00 2010-06-04 13:55:00
2010-06-05 18:55:00 2010-06-05 19:55:00
2010-06-06 19:00:00 2010-06-06 20:00:00

Unless I duplicate the first record, it does not show.

Has anyone else ever experienced this error and what should I do to fix it?


Edited by whitestream6: n/a

8 Years
Discussion Span
Last Post by Monster Killer

I have not had this but it could be due to this:

where expiration >= now()

If the 4th record does not meet this then it wont be displayed. And because you duplicated the first, that meets the rule so its there twice.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.