CodeIgniter JQXWIDGETS |
Hello Community,
Has anyone tried using jqwidgets grid? I am using this for a server side paging. I am retrieving a large data from database so I need to user paging. I have followed the tutorials on their website, and able to make it work. But only the pagesize. When i change the pagesize, it refreshes and pull out data from the database. Let say I selected 100, the grid will refresh and fetch 100 records from the database. But the problem is in the pagenum. When I click the next or previous button, it seems that is not passing anything to the server. Would you help me with this? I appreciate it so much. Let me show you my code. // Controller: PHP Code: public function fetchCustomers() { // MODEL PHP Code: public function fetchCustomers($pagenum, $pagesize) { // JAVASCRIPT Code: $(document).ready(function() { // SQL QUERY Code: ALTER procedure [dbo].[fetchCustomers] Sending thanks from Philippines - DAN
As far I can see you never include pagesize or pagenum in your Ajax.
Look at the Network tab in your Browsers Dev tools. And look at the data you actually sends to your server every time you press a number.
(01-20-2018, 06:40 AM)jreklund Wrote: As far I can see you never include pagesize or pagenum in your Ajax. Hi jreklund, yes i have already did that I checked the data passed on network tabs. What I know is that jqwidgets passes pagenum for me. I mean i dont have to define it in my code. Am not sure though. When I change the pagesize it is retrieving records from the server. But if i clicked the next button nothing is happening. Thankyou..
Hi,
Thank you for your suggestions, it makes me see what I might be doing wrong. The problem is on my SQL query. It is not getting all the results. It just gets the results with the limit and offset applied. Here is my new query. Hope it helps someone: Code: SELECT
@danangeloalcanar,
By any chance do you test your SQL in MySQL Workbench (or any other MySQL tool)? This would help you to determine how effective your query is. |
Welcome Guest, Not a member yet? Register Sign In |