Tutorial :all data can show but “sEcho” value empty



Question:

 if (postVar('sSearch') !="" ) {      $sWhere = " WHERE Line LIKE '%".mysql_real_escape_string( $_POST['sSearch'] )."%' OR ".                "Model LIKE '%".mysql_real_escape_string( $_POST['sSearch'] )."%' OR ".                "NIK LIKE '%".mysql_real_escape_string( $_POST['sSearch'] )."%' ";      }   $sQuery = "SELECT  Line, Model, NIK FROM   inspection_report ".$sWhere.$sOrder.$sLimit;   $rResult = mysql_query( $sQuery) or _doError(_ERROR30 . ' (<small>' . htmlspecialchars($sql) . '</small>): ' . mysql_error() );     $sQuery = "SELECT  Line, Model, NIK FROM   inspection_report ".$sWhere.$sOrder.$sLimit;   $rResult = mysql_query( $sQuery) or _doError(_ERROR30 . ' (<small>' . htmlspecialchars($sql) . '</small>): ' . mysql_error() );            $sQuery = "SELECT FOUND_ROWS()";          $rResultFilterTotal = mysql_query( $sQuery) or _doError(_ERROR30 . ' (<small>' . htmlspecialchars($sql) . '</small>): ' . mysql_error() );  // submit SQL to My$          $aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);          $iFilteredTotal = $aResultFilterTotal[0];            $sQuery = "SELECT COUNT(Line) FROM   inspection_report";            $rResultTotal = mysql_query( $sQuery) or _doError(_ERROR30 . ' (<small>' . htmlspecialchars($sql) . '</small>): ' . mysql_error() );  // submit SQL to MySQL an$          $aResultTotal = mysql_fetch_array($rResultTotal);          $iTotal = $aResultTotal[0];            $sOutput = '{';          $sOutput .= '"sEcho": '.$sEcho.',';   

i've been use that code but why the result is empty? {"sEcho": ,


Solution:1

 $sOutput = '{';          $sOutput .= '"sEcho": '.intval($_POST['sEcho']).',';               $sOutput .= '"iTotalRecords": '.$iTotal.', ';          $sOutput .= '"iTotalDisplayRecords": '.$iTotal.', ';          $sOutput .= '"aaData": [ ';  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »