$people_hadnum = $get_data['total_people'] + 1; $stmt_update = $this->db->prepare($sql_update); $stmt_update->bindparam(':trip_id', $get_data['tripId']); $stmt_update->bindparam(':people_hadnum', $people_hadnum); if ($stmt_update->execute()) { $this->res['code'] = 0; $this->res['message'] = 'success'; } else { $this->db->errorInfo(); $this->res['code'] = 1023; $this->res['message'] = '更新出行表信息'; } } else { $this->db->errorInfo(); $this->res['code'] = 1024; $this->res['message'] = '记录出行信息失败'; } } } else { $this->res['code'] = 1025; $this->res['message'] = 'trip 不存在'; } } function __destruct() { $this->die_json($this->res); } } $join = new Join(); $join->index();