混淆如何在jqgrid中发布用于编辑行的数据

问题描述

|| 这是我第一次使用jqgrid。 我对如何发布模态的编辑行(铅笔图标)中的所有值感到困惑。 我对dataTable非常熟悉,但在此插件中却不熟悉。在此编辑过程中,我需要一些服务器端脚本。因此,我可以从中学到东西。 您能否提供一些教程或示例来发送此数据? 提前致谢。
jQuery(\"#list\").jqGrid({
                         url:\'dounfinish.php\',datatype: \'json\',mtype: \'POST\',colNames:[\'id\',\'Date\',\'Line\',\'Shift\',\'Model\',\'Serial\',\'DIC\',\'Def_class\',\'Symptom\',\'Cause\',\'Symgrup\',\'Modgrup\'],colModel :[......],pager: jQuery(\'#pager\'),rowNum:10,rowList:[10,20,30],sortname: \'Problem_date\',sortorder: \"desc\",editurl: \"process1.php\",viewrecords: true,imgpath: \'themes/basic/images\',caption: \'OQC DEFECT DATA\'
                                                }); 
                        jQuery(\"#list\").jqGrid(\'navGrid\',\'#pager\',{edit:true,add:false,del:false});
如何向此发送数据:
........
case \'edit\':
         edit(postVar(\'id\'),postVar(\'DIC\'),postVar(\'Def_class\'),postVar(\'Symptom\'),postVar(\'Cause\'));
                break;
           });
function edit($id,$DIC,$Def_class,$Symptom,$Cause){
        $defID = mysql_real_escape_string($id);
        $DIC = mysql_real_escape_string($DIC);
        $Defclass = mysql_real_escape_string($Def_class);
        $Symp = mysql_real_escape_string($Symptom);
        $Cause = mysql_real_escape_string($Cause);
        $DIC=strtoupper($DIC);
        $Defclass=strtoupper($Defclass);

        $sql = \"UPDATE oqc_defect SET DIC = \'\".$DIC.\"\',Def_class = \'\".$Defclass.\"\',\";
        $sql.= \"Symptom = \'\".$Symp.\"\',Cause = \'\".$Cause.\"\' \";
        $sql.= \"WHERE def_id = \".$defID;

echo $sql;
$result=mysql_query($sql) or die(_ERROR26.\": \".mysql_error());
//echo $result;
mysql_close($dbc);
}
    

解决方法

只需加上2便可以正常工作。     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...