dongpao1905 2011-05-20 04:32
浏览 45
已采纳

更改期间数据表冻结显示条目

I have like below: after change show entries datatable no response After I have changed show entries to 25 in datatable, the datatable seems no response. Its just show processing inside datatable body.

This the server side script for show entries:

$sLimit = "";
        if ( isset( $_POST['iDisplayStart'] ) )
        {
                $sLimit = " LIMIT ".mysql_real_escape_string( $_POST['iDisplayStart'] ).", ".
                        mysql_real_escape_string( $_POST['iDisplayLength'] );
        }

why its happen? how to fix that? Exactly I have two datatables inside this page.I put them in different tabs.

Datatable script

html table

serverside script


The trouble come during show range column but if not use this column all can work properly.the query like:

$sQuery = "SELECT DATE(A.Inspection_datetime) AS Date, A.Line, A.Model, 
                                  A.Lot_no,A.Range_sampling,COUNT(A.Serial_number) AS Error,B.name AS PIC
                           FROM inspection_report A
                           LEFT JOIN Employee B
                           ON A.NIK=B.NIK
                           WHERE CHAR_LENGTH( A.Range_sampling ) < 17
                           AND MONTH(A.Inspection_datetime)=MONTH(CURRENT_DATE)" .$sWhere.$sGroupBy.$sOrder.$sLimit;

Whether CHAR_LENGTH is the root cause? exactly this problem only occurs on the database a server for a local computer everything goes well.why?

  • 写回答

1条回答 默认 最新

  • dongpang1898 2011-05-26 22:58
    关注

    I had the same issue. In the fnServerData handler, you can read aoData[0].value to get the 'sEcho' value. This values needs to be assigned to the sEcho property of the json object you pass to your datatable.

    The expected type for sEcho is also a string and you are converting to an integer.

    $sOutput .= '"sEcho": '.intval($_POST['sEcho']).','; 
    

    try just

    $sOutput .= '"sEcho": "'. $_POST['sEcho'] .'" ,';

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页