PHP Classes

PHP Datatable AJAX JSON Server: Generate JSON data from database queries

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 85 This week: 1All time: 9,942 This week: 110Up
Version License PHP version Categories
datatable_server 1.0Custom (specified...5PHP 5, Databases, AJAX, Global


This package can generate JSON data from database queries.

It provides a function that takes a configuration array and executes SQL queries on specific tables using the CodeIgniter framework.

The function returns a JSON string with the database query results suitable for being used by AJAX JavaScript code on the browser to display the query results without reloading the page.

Picture of Shabeer ALi M
  Performance   Level  
Name: Shabeer ALi M <contact>
Classes: 4 packages by
Country: India India
Age: ???
All time rank: 3670254 in India India
Week rank: 132 Up17 in India India Up
Innovation award
Innovation award
Nominee: 2x


Datatable Server

Datatable server .

- Easy to use - Codeignator plug-in available.

Datatable server is php code that you can create json easily for [ajax datatable].

> The overriding design goal for Datatable Server PHP function is to create json easily with less configuration for datatable.



Codeigniter Usage


You need to add [codeigniter/datatable_server_helper.php] in Codeigniter helpers folder: (yourproject/application/helpers/)


Call the function in your controller

//your custom function to call inside json render
function your_function($mobile){
    return $mobile;

    // Coloums you need to select form database. [Array()]
    'aColumns' => array( 'id','name','email','mobile'),
    //Index coloum of the table.	[String]
    'sIndexColumn' => 'id', 
    // Table name 	[String]
 	// You can also gave join statement
 	// ex : 'sTable' =>"order left join invoice on invoiceid=orderid" ,
    'sTable' =>"address-book" , 	
    //If you have any conditional statement you can add like this. [String][optional]
    //'sCondition'=>'name like "%a"',	
	//Output needed in each coloum. [Array(Array('type'=>value))]
	// Usage
	// text	=>	Normal Text values
	// var =>  Variable Name.The variable name will replaced with the variable value.
	// The variable that you are selecting should be added in aColoums.
	// html =>  You can directly gave html. If you want to use variable in between you can use {{variable name}}.
	 // eval =>  You can call a function that you have written.You can use the arguments as your variable that you selected in aColoums.
     'aColumns_out' => array( 
         array('html'=>'<a href="mailto:{{email}}">{{email}}</a>'),
echo dt_get_json($config);


MIT [codeigniter/datatable_server_helper.php]: [ajax datatable]:

  Files folder image Files  
File Role Description
Files folder imagecodeigniter (1 file)
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  codeigniter  
File Role Description
  Accessible without login Plain text file datatable_server_helper.php Example Example script

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:9,942
This week:110Up