This is my pagination script, which I've been working on:
This is the query page which displays the records - but it omits the first record:
The actual query is this:
<?php
//Require the file that contains the required classes
include("pmcPagination.php");
//PhpMyCoder Paginator
$paginator = new pmcPagination(20, "page");
//Connect to the database
mysql_connect("localhost","root","PASSWORD HIDDEN FOR SECURITY REASONS");
//Select DB
mysql_select_db("housemde");
//Select only results for today and future
$result = mysql_query("SELECT * FROM housemd WHERE expiration > NOW()
order by airdate;");
$recordCount = mysql_num_rows($result);
//You can also add reuslts to paginate here
mysql_data_seek($result,0) ;
while ($row = mysql_fetch_array($result))
{
$paginator->add(new paginationData($row['programme'],
$row['channel'],
$row['airdate'],
$row['expiration'],
$row['episode'],
$row['series'],
$row['epno'],
$row['setreminder']));
}
?>
and the dates are all in the future, yet to even get the first record to show, I have to duplicate it in PhpMyadmin - so what is wrong with my script?
Is it something to do with mysql_fetch_array, and if so, where do I need to fix the script?
In any case, here's the data from the database, all showing records for future events:
In short, the basic problem is, I have to manually duplicate a record to get it to show in the script sometimes, and I'm trying to find a fix - but I'm having trouble looking for a solution. I've tried myself, and it didn't work.
I hope I've explained this well enough.
Any help on fixing this is appreciated (just post the solutions in my pastebin links where it allows you to submit a correction/amendment to the pastebin, if you want.)
Thanks!