i've gone php crazy.. 😃
anyway.. i'm trying to create a site navigation on my news site. the query code is:
this is for displaying the result on the page
$query1 = "SELECT * FROM news ORDER BY id DESC LIMIT $offset, $rowsPerPage";
this is to count the rows.
$query2 = "SELECT COUNT(id) AS numrows FROM news";
this works fine with indexing all of the entries in the table. What I'm trying to do is to index the site by article category. So I modified the query code:
this is for displaying the result on the page
$query1 = "SELECT * FROM news WHERE category='$cat' ORDER BY id DESC LIMIT $offset, $rowsPerPage";
this is to count the rows
$query2 = "SELECT count(id) AS numrows FROM news where category='$cat'";
the page displayed fine at first but when i click the next button...the next page is empty..i click on previous..it's also empty.
I'm stumped so I'm turning to the experts here.
😕
Thanks