sAjaxSource...
sAjaxSource...
narutimateum
Posts: 12Questions: 0Answers: 0
Dear mr allan...what is sAjaxSource...i meant....do you have like a sample of those ajax script would looks like??the sources i mean....because most of the examples here is more to the datatables side...there is not much of an example on the other side...
This discussion has been closed.
Replies
the script is this
* Script: DataTables server-side script for PHP and MySQL
* Copyright: 2010 - Allan Jardine
* License: GPL v2 or BSD (3-point)
There is also documentation on server-side processing for DataTables here: http://datatables.net/usage/server-side
To do a 'join' of multiple tables for the server-side processing scripts, you'll need to modify the aColumns ans sTable parameters. There are a number of posts in the forums showing how to do that. You will need to modify the code that is available from the above links to do this as there currently isn't a join example.
Allan
your ajax file will be like :
[code]
<?php
require_once('Datatables.php');
$datatables = new Datatables();
// MYSQL configuration
$config = array(
'username' => 'root',
'password' => '',
'database' => '',
'hostname' => 'localhost');
$datatables->connect($config);
$datatables
->select('film.film_id as id, title, description, release_year')
->from('film')
->join('category', 'category.category_id = film.film_id' )
->select('name');
echo $datatables->generate();
?>
[/code]
and thats it.
about Ignited Datatables Library :
http://datatables.net/forums/discussion/5133/ignited-datatables-native-php-version
Allan
numberone this is AWESOME!! Question though.. How would i do a SELECT CONCAT? It's not working for me. Thanks
Allan