Hi,
I need some help if anyone has the time. I am new at php, and am trying to perform some simple paging tasks from a mysql database.
I have built a forum using a single table, and have followed examples for how to page through the records of a query that returns the message posts in DESC order. I can succesfully page through the recordset from start to finish without a problem. So, my previous and next functionality is all in place.
The problem is that I would also like to give the user the ability to select a specific date to start from. I would like the user to be placed on the first record that occurs on the date requested, but still page through the recordset using the previous and next functions.
I see the psuedo code like this:
// Retrieve the date supplied by user
// Retrieve the recordset of posts in DESC order, pointer at 0
// Loop through the recordset until last record (since we are in descending order) with the target date is found
////If no target date found, then first record of date after the target date is selected
// Assign value of pointer within the overall recordset to a variable X
//--->Continue with existing code that uses paging algorithm and requires the variable X assigned above as a starting point to my LIMIT expression within the sql query