Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3271058
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:41:38+00:00 2026-05-17T18:41:38+00:00

This is my pagination script, which I’ve been working on: http://pastebin.com/4mpjdWKD This is the

  • 0

This is my pagination script, which I’ve been working on:

http://pastebin.com/4mpjdWKD

This is the query page which displays the records – but it omits the first record:

http://pastebin.com/kJZy9fv0

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:

http://pastebin.com/gwcv7qza

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:41:39+00:00Added an answer on May 17, 2026 at 6:41 pm

    I think the problem is in your Paginatop class

    this row $result = ($page – 1) * $resultsPerPage + 1; will return 1 for the first page and you will show the second element in $this->items[$result] array – $this->items[1], not the first $this->items[0].

    Give it a try with $result = ($page – 1) * $resultsPerPage;

    for page 1 $result will be 0
    for page 2 $result will be 19 (if showing 20 records per page)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pagination script, which can be seen here: http://www.automotori6282.tk/phpsandbox/ This is the
This is my pagination script which extracts info for my TV guide project that
I have this script below which i found on SO to generate pagination and
I have a working pagination script, it displays the data with few issues. However,
I'm a PHP novice, and I recently found this database-free pagination script on a
I want to implement this JSF page with pagination and sorting. Unfortunately Netbeans shows
I have this Java code which is used for JSF pagination: public List<ActiveSessionObj> list(int
I found this JSF tutorial which shows how to create JSF table with pagination
It looks like this template tag works like a charm for most people: http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/
This is my script which i have used to paginate ,,The datas are restricted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.