I have problem with page navigation.My problem is that am getting all the records in one page. $rowsPerPage = 10; I have 30 records, all are showed in one page...not the 10 records.Here is my code.
Error occured is :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 10' at line 1.
This error is some where around this line:if(!$result){die(mysql_error());}
What is the solution?
Last edited by Suhacini; May 27th, 2008 at 2:54 am.
From the above code I am not getting any error but,the link to next page is not enabled.Even though $limit=10; & $rowsPerPage =10; both are declared as '10'.If I have 15 records all of them are displayed in the same page,but not in the 2 different pages.
Anyone to help regarding this??
Last edited by Suhacini; May 27th, 2008 at 10:00 am.
<td>Showing page <strong>".$page."</strong> of <strong>".$maxPage."</strong> pages </td>
</tr>";
?>
In Page1 data displayed is from A1 to A10. Now the problem is that if I go to Page 2 data displayed must be from A11 to A12 but in this case it displaying the data where Id=11 in my db.
What is wrong with this code?
<td>Showing page <strong>".$page."</strong> of <strong>".$maxPage."</strong> pages </td>
</tr>";
?>
In Page1 data displayed is from A1 to A10. Now the problem is that if I go to Page 2 data displayed must be from A11 to A12 but in this case it displaying the data where Id=11 in my db.
What is wrong with this code?
I don't really understand the question here. What is the difference between A11 and Id=11?
Actually am using this for search.In my db I am storing few words A-Z but not in alphbetic order.so when i wanted to search 'A',then all data from my db related to 'A' must display.Here am able to display A1 to A10 in 1st page.In 2nd page it should start with A11 but it is displaying the data from my db whose Id=11.Am I clear to you now?
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.