Fetch records from database given limit Ajax data table
Fetch records from database given limit Ajax data table
bala16
Posts: 5Questions: 4Answers: 0
In my database a table contains millions of records. i want to view it like datatables. but using data tables page take too long time to load my db is crashed. I want only one I need fetch records given limit(Like us 10, 20 etc), if i click next button, at that time only next 10 records fetched from database, and also search box is needed like us data tables.. What can i do for this problem.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Sounds like you want to use server-side processing. See this manual page for an overview of client-side and server-side processing.
Allan
@allan Thanks, Did You send Any Sample Files Or Codes For server Side Processing, Am A beginner, Please Help Us.. And Also I need pagination, sorting, search.
No I didn't send any sample files. There is an example here which uses PHP.
Allan
Hello Allan ,
I have seen the example and i have put the code below
$(document).ready(function() {
$('#example').dataTable({
"processing": true,
} );
In This Code "deferLoading": 57 is not working . when i go to 1 page to 2nd page the processing or loader is not dispaly. some time it will gives memory error. I have 5 million record in my data table. can you please help me.
I am getting this below error in my firebug.
<b>Fatal error</b>: Allowed memory size of 134217728 bytes exhausted (tried to allocate 5242940 bytes) in <b>D:\projects</b> on line <b>47</b><br />
A PHP Error was encountered
Severity: Error
Message: Allowed memory size of 134217728 bytes exhausted (tried to allocate 5242940 bytes)
Filename: controllers/Test.php
Line Number: 47
Backtrace:
My sir will not allow memory in the php.ini file. they told me that without memory allocation get the solution . have you any solution for the same. I am waiting for your reply.
The
deferLoading
option over works withserverSide
which you are not using.Let's not have this same conversation in two different places. I'm going to close this thread in favour of your other one on this topic.
Allan