|
6#

楼主 |
发表于 2023-10-26 15:47:46
|
只看该作者
$strsql="CALL smt.APP_SMT_SCAN('{$trsn}','{$emp}','{$machine}','{$action}','{$device}');";
$info=$info."<p style=\"margin-top:0px;margin-bottom:0px;\"><b>执行操作:</b>{$strsql}</p>";
$this->app->AjaxAttr("info",$info);
$this->app->prepare_mes();
$recordSet=$this->app->mes->execute($strsql);
if(isset($recordSet->fields)){
if($recordSet->EOF){
$msg= "SQL没有返回数据";
}else{
$msg= "SQL没有RES返回参数";
$rs=$recordSet->fields;
if (array_key_exists('prompt', $rs)){
$prompt=$this->app->LL($rs["prompt"]);
}
if (array_key_exists('machine', $rs)){
$machine=$rs["machine"];
}
if (array_key_exists('res', $rs)){
$msg=$rs["res"];
}
}
}else{
$msg="数据库连接失败!".strToUtf8($this->app->mes->ErrorMsg());
};
$this->app->AjaxAttr("prompt",$prompt);
$this->app->AjaxAttr("machine",$machine);
if(substr($msg,0,2)=="OK"){
$this->app->AjaxAttr("sound","0");
$this->app->AjaxOK(array(),$msg);
}else{
$this->app->AjaxAttr("sound","1");
$this->app->AjaxFail("{$msg}", 100);
return ;
}
if(strlen($trsn)<5){
return;
}
while($recordSet->nextRecordSet()){}; |
|