Jump to content

Pagination issue using variables...


A JM

Recommended Posts

I'm successfully getting a first page full of results with my pagination query but when I move to the next page the page is blank and I believe it is the result of the variables being used in the query, specifically user chosen dates, etc., not being passed to the next page.

 

$query_rstcue = "SELECT c.*, u.firstname AS data_first, u.lastname AS data_last, h.firstname AS adj_first, h.lastname AS adj_last
FROM cue c LEFT JOIN users u ON(c.data_id = u.id) LEFT JOIN users h ON(c.adj_id = h.id) 
WHERE c." . $queryname . " AND c.new_timestamp BETWEEN '" . $queryfrom . "' AND '" . $queryto . "' ORDER BY c." . 
$querysort . " ASC";

$query_limit_rstcue = sprintf("%s LIMIT %d, %d", $query_rstcue, $startRow_rstcue, $maxRows_rstcue);
$rstcue = mysql_query($query_limit_rstcue, $maxdbconn) or die(mysql_error());
$row_rstcue = mysql_fetch_assoc($rstcue);

 

 

So I have 2 questions,

 

1) is this the expected behavior of a pagination query?

 

2) do I need to just pass the date variables, etc. when the next page is requested?

 

 

Link to comment
https://forums.phpfreaks.com/topic/174310-pagination-issue-using-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.