Hi,
I'm newbie and I'm trying to show my first datatable using server side processing.
Right now I have solved the error Undefined index: sEcho in server_processing.php, and I get the values from datatable "ajax" included in 1.9.4 package.
I have a page called index.php (for my test):
index.php:
require_once("../../server_side/scripts/server_processing.php");
<head>
/*Initialization scripts here, everything works ok */
</head>
/* http://datatables.net/blog/Getting_started_with_DataTables%3A_First_steps */
<table id="example" class="display">
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../../server_side/scripts/server_processing.php"
} );
} );
</script>
I get the data from database correctly (see below).
What missing?
Thanks
dump($$output):
Array
(
[iTotalRecords] => 57
[iTotalDisplayRecords] => 57
[aaData] => Array
(
[0] => Array
(
[0] => Trident
[1] => Internet Explorer 4.00000 /* Changed by me to make some test */
[2] => Win 95+
[3] => 4
[4] => X
)
[1] => Array
(
[0] => Trident
[1] => Internet Explorer 5.0
[2] => Win 95+
[3] => 5
[4] => C
)
[2] => Array
(
[0] => Trident
[1] => Internet Explorer 5.5
[2] => Win 95+
[3] => 5.5
[4] => A
)
[3] => Array
(
[0] => Trident
[1] => Internet Explorer 6
[2] => Win 98+
[3] => 6
[4] => A
)
[4] => Array
(
[0] => Trident
[1] => Internet Explorer 7
[2] => Win XP SP2+
[3] => 7
[4] => A
)
[5] => Array
(
[0] => Trident
[1] => AOL browser (AOL desktop)
[2] => Win XP
[3] => 6
[4] => A
)
[6] => Array
(
[0] => Gecko
[1] => Firefox 1.0
[2] => Win 98+ / OSX.2+
[3] => 1.7
[4] => A
)
[7] => Array
(
[0] => Gecko
[1] => Firefox 1.5
[2] => Win 98+ / OSX.2+
[3] => 1.8
[4] => A
)
etc.....
)
)
I'm newbie and I'm trying to show my first datatable using server side processing.
Right now I have solved the error Undefined index: sEcho in server_processing.php, and I get the values from datatable "ajax" included in 1.9.4 package.
I have a page called index.php (for my test):
index.php:
require_once("../../server_side/scripts/server_processing.php");
<head>
/*Initialization scripts here, everything works ok */
</head>
/* http://datatables.net/blog/Getting_started_with_DataTables%3A_First_steps */
<table id="example" class="display">
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../../server_side/scripts/server_processing.php"
} );
} );
</script>
I get the data from database correctly (see below).
What missing?
Thanks
dump($$output):
Array
(
[iTotalRecords] => 57
[iTotalDisplayRecords] => 57
[aaData] => Array
(
[0] => Array
(
[0] => Trident
[1] => Internet Explorer 4.00000 /* Changed by me to make some test */
[2] => Win 95+
[3] => 4
[4] => X
)
[1] => Array
(
[0] => Trident
[1] => Internet Explorer 5.0
[2] => Win 95+
[3] => 5
[4] => C
)
[2] => Array
(
[0] => Trident
[1] => Internet Explorer 5.5
[2] => Win 95+
[3] => 5.5
[4] => A
)
[3] => Array
(
[0] => Trident
[1] => Internet Explorer 6
[2] => Win 98+
[3] => 6
[4] => A
)
[4] => Array
(
[0] => Trident
[1] => Internet Explorer 7
[2] => Win XP SP2+
[3] => 7
[4] => A
)
[5] => Array
(
[0] => Trident
[1] => AOL browser (AOL desktop)
[2] => Win XP
[3] => 6
[4] => A
)
[6] => Array
(
[0] => Gecko
[1] => Firefox 1.0
[2] => Win 98+ / OSX.2+
[3] => 1.7
[4] => A
)
[7] => Array
(
[0] => Gecko
[1] => Firefox 1.5
[2] => Win 98+ / OSX.2+
[3] => 1.8
[4] => A
)
etc.....
)
)