DataTables Pagination Server-side Processing using PHP and MySQL

DataTables Pagination Server-side Processing using PHP and MySQL

In this Post We Will Explain About is DataTables Pagination Server-side Processing using PHP and MySQL With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to DataTables Server-side Processing using PHP with MySQLExample

In this post we will show you Best way to implement DataTable Pagination using PHP & MySQL Example, hear for create jQuery Datatable pagination using PHP and MySQLwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Also Read This πŸ‘‰   SQL SELECT DISTINCT Statement

Project Structure


Mysql Table : create table structure

CREATE TABLE `students` (
`id` int(11) NOT NULL COMMENT 'primary key',
`stud_name` varchar(255) NOT NULL COMMENT 'students name',
`stud_fees` double NOT NULL COMMENT 'students salary',
`stud_age` int(11) NOT NULL COMMENT 'students age'


$yoursname = "localhost";
$username = "root";
$password = "[email protected]";
$dbname = "pakainfo";
$conn = mysqli_connect($yoursname, $username, $password, $dbname);

jquery library files

<script src=""></script>
<link rel="stylesheet" type="text/css" href="https:////">
<script src="https:////"></script>


<div class="container">
<h2>Simple jQuery DataTable server side Pagination using PHP & MySQL Examples</h2>
<div class="row">
<table id="livedatatable" class="display" width="100%" cellspacing="0">
<div style="margin:50px 0px 0px 0px;">
<a class="btn btn-default read-more" style="background:#3399ff;color:white" href="" title="free Download All Example">Back to Tutorial</a>


jQuery( document ).ready(function() {
var table = jQuery('#livedatatable').dataTable({
"bProcessing": true,
"sAjaxSource": "data_allpage.php",
"iDisplayLength": 10,
"bFilter": false,
"aoColumns": [
{ mData: 'stud_id' } ,
{ mData: 'Name' },
{ mData: 'fees' }


$sql = "SELECT id as stud_id,stud_name as Name,stud_fees as fees FROM students LIMIT 20";
$dataresults = mysqli_query($conn, $sql) or die("simple your database error:". mysqli_error($conn));
$studarray = array();
while( $datarows = mysqli_fetch_assoc($dataresults) ) {
$studarray[] = $datarows;
$results = array(
"sEcho" => 1,
"iTotalRecords" => count($studarray),
"iTotalDisplayRecords" => count($studarray),
echo json_encode($results);


Also Read This πŸ‘‰   Server side Laravel DataTables example

I hope you have Got What is DataTables Server-side Processing using PHP with MySQL And how it works.I would Like to have FeadBack From My Blog( readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article( Are Most Always Welcome.