其中一个没有获取到对应值就调用后台页面其他ajax访问。
case 'insert_message_phone':
$message_id = $_REQUEST['message_number'];
$message_gather = $_REQUEST['message_gather'];
$sql = "insert into s_message_config (message_id,phone_gather) values ('$message_id','$message_gather')";
$obj_db_main->doexec($sql);
if(mysqli_affected_rows($obj_db_main->dbconn)>0){
$Jsonstr['rltcode']=1;
$Jsonstr['description']="插入成功";
echo json_encode($Jsonstr);
/* header("location:message_config.php");*/
exit;
} else {
$Jsonstr['rltcode']=0;
$Jsonstr['description']="插入失败";
echo json_encode($Jsonstr);
exit;
}
break;
case 'send_message':
$id = $_REQUEST['id'];
$sql = "select phone_gather from s_message_config where id = $id";
$result = $obj_db_main->doquery_row($sql);
$message_str = $result['phone_gather'];
$message_phone = explode(',',$message_str);
$Jsostr['phone'] = $message_phone;
而且输出值不仅仅输出当前的,还会输出之前定义过的。