Undefined index: sEcho in

Undefined index: sEcho in

sumeetbajajsumeetbajaj Posts: 3Questions: 1Answers: 0
edited March 2016 in Free community support

Is any one there to solve this?
I am using mysqli.

Notice: Undefined index: sEcho in C:\xampp\htdocs\stylishbabu\admin\datatable\category_datatable.php on line 155
{"sEcho":0,"iTotalRecords":"12","iTotalDisplayRecords":"12","aaData":[["2","first"],["3","second"],["4","third"],["5","check"],["6","teststest"],["7","uytutyuty"],["8","qweqweqw"],["9","testtetest"],["10","poiuyy"],["11","bvcbdfgdfg"],["12","last"],["13","tesing today"]]}

Answers

  • sumeetbajajsumeetbajaj Posts: 3Questions: 1Answers: 0
    edited March 2016
    "sEcho"                => intval($_GET['sEcho']),
    

    When i comment this line then it run success but page it showing all entries.

  • allanallan Posts: 63,783Questions: 1Answers: 10,511 Site admin
    edited March 2016

    It would be helpful if you could link to a test page showing the issue, as per the forum rules, as it would answer the following questions:

    1. What version of DataTables are you using?
    2. Are you using the legacy Ajax configuration options or are you using ajax?
    3. Are you using the legacy server-side mode?

    Allan

  • sumeetbajajsumeetbajaj Posts: 3Questions: 1Answers: 0
    edited March 2016

    $output = array(
    "sEcho" => intval($_GET['sEcho']),
    "iTotalRecords" => $iTotal,
    "iTotalDisplayRecords" => $iFilteredTotal,
    "aaData" => array(),
    );

    I am getting problem here
    When i comment here
    // "sEcho" => intval($_GET['sEcho']),
    it is running fine but it showing all entries means not showing 10 vales it showing all table values.

    I am using your datatable
    /**
    * Script: DataTables server-side script for PHP 5.2+ and MySQL 4.1+
    * Notes: Based on a script by Allan Jardine that used the old PHP mysql_* functions.
    * Rewritten to use the newer object oriented mysqli extension.
    * Copyright: 2010 - Allan Jardine (original script)
    * 2012 - Kari Söderholm, aka Haprog (updates)
    * License: GPL v2 or BSD (3-point)
    */

    mysqli using.

  • allanallan Posts: 63,783Questions: 1Answers: 10,511 Site admin

    Sorry I wasn't clear before. Please link to a page showing the issue so it can be debugged.

    The server-side script you give above is for legacy server-side processing. I don't know if you have configured DataTables for legacy mode.

    Allan

This discussion has been closed.