I have a advanced module and i am loading the data-table through json object, Pagination and onclick ascending and descending is not working because i am loading the data from json. How to get the onclick asc and desc and pagination
I am getting the values and in controller i am loading this and generating json value through which i am getting a value listed in my customized table, because of this i am not getting on click asc and desc and pagination
Comments
{ if(isset( $_REQUEST['id'])) {
$name = $_POST['id'];
}
$sql ="SELECT xxxtablename.number, xxxtablename.Date, xxxtablename2.name, xxxtablename.area, xxxtablename.phno, xxxtablename.code
FROM xxxtablename
LEFT JOIN xxxtablename2 ON xxxtablename2.Id = xxxtablename.Id
LEFT JOIN xxxtablename3 ON xxxtablename3.Id = xxxtablename.Id";
if(!empty($name)) {
$sql.=" WHERE xxxtablename3.Name='".$name."'";
}
$query = $this->db->query($sql);
$arr='';
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
$arr[] =$row;
}
}
return $arr;
}
I am getting the values and in controller i am loading this and generating json value
through which i am getting a value listed in my customized table, because of this i am not getting on click asc and desc and pagination