当前位置: 首页>>代码示例>>PHP>>正文


PHP Error::fetch方法代码示例

本文整理汇总了PHP中Error::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP Error::fetch方法的具体用法?PHP Error::fetch怎么用?PHP Error::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Error的用法示例。


在下文中一共展示了Error::fetch方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unset

unset($rel);
/**
 * Delete patient
 */
$patQ = new Query_Page_Patient();
if (defined("OPEN_DEMO") && !OPEN_DEMO) {
    if (!$patQ->select($idPatient)) {
        $patQ->close();
        FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
        header("Location: " . $returnLocation);
        exit;
    }
    $patient = $patQ->fetch();
    if (!$patient) {
        $patQ->close();
        Error::fetch($patQ);
    }
    $historyQ = new Query_History();
    $historyQ->selectPersonal($idPatient);
    $historyP = $historyQ->fetch();
    $historyQ->selectFamily($idPatient);
    $historyF = $historyQ->fetch();
    //Error::debug($patient); Error::debug($historyP); Error::debug($historyF, "", true);
    $delPatientQ = new Query_DelPatient();
    $delPatientQ->insert($patient, $historyP, $historyF, $_SESSION['auth']['user_id'], $_SESSION['auth']['login_session']);
    unset($delPatientQ);
    unset($patient);
    unset($historyQ);
    unset($historyP);
    unset($historyF);
}
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:patient_del.php

示例2:

$history = $historyQ->fetch();
if ($history) {
    $formVar["id_patient"] = $history->getIdPatient();
    $formVar["birth_growth"] = $history->getBirthGrowth();
    $formVar["growth_sexuality"] = $history->getGrowthSexuality();
    $formVar["feed"] = $history->getFeed();
    $formVar["habits"] = $history->getHabits();
    $formVar["peristaltic_conditions"] = $history->getPeristalticConditions();
    $formVar["psychological"] = $history->getPsychological();
    $formVar["children_complaint"] = $history->getChildrenComplaint();
    $formVar["venereal_disease"] = $history->getVenerealDisease();
    $formVar["accident_surgical_operation"] = $history->getAccidentSurgicalOperation();
    $formVar["medicinal_intolerance"] = $history->getMedicinalIntolerance();
    $formVar["mental_illness"] = $history->getMentalIllness();
} else {
    Error::fetch($historyQ, false);
}
$historyQ->freeResult();
$historyQ->close();
unset($historyQ);
unset($history);
/**
 * Show page
 */
$title = _("Editar antecedentes clínicos");
$titlePage = $patient->getName() . ' (' . $title . ')';
$focusFormField = "birth_growth";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
//$returnLocation = "../medical/history_personal_view.php?id_patient=" . $idPatient;
$returnLocation = "../medical/history_personal_view.php";
开发者ID:edubort,项目名称:openclinic,代码行数:31,代码来源:history_personal_edit_form.php

示例3: intval

 * This is only used when copying an existing theme.
 */
if (isset($_GET["id_theme"])) {
    $idTheme = intval($_GET["id_theme"]);
    include_once "../model/Query/Theme.php";
    $themeQ = new Query_Theme();
    $themeQ->select($idTheme);
    $theme = $themeQ->fetch();
    if ($theme) {
        $formVar["css_file"] = $theme->getCssFile();
        $filename = "../css/" . $theme->getCssFile();
        $fp = fopen($filename, 'r');
        $formVar["css_rules"] = fread($fp, filesize($filename));
        fclose($fp);
    } else {
        Error::fetch($themeQ, false);
    }
    $themeQ->freeResult();
    $themeQ->close();
    unset($themeQ);
    unset($theme);
} elseif (!isset($formError)) {
    $filename = "../css/" . "scheme.css";
    $fp = fopen($filename, 'r');
    $formVar["css_rules"] = fread($fp, filesize($filename));
    fclose($fp);
}
/**
 * Show page
 */
$title = _("Add New Theme");
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:theme_new_form.php

示例4: Query_Setting

 * Testing connection and current version
 */
$setQ = new Query_Setting();
echo Msg::info(_("Database connection is good."));
/**
 * Show warning message if database exists
 */
$setQ->captureError(true);
$setQ->select();
if ($setQ->isError()) {
    echo HTML::para(_("Building OpenClinic tables..."));
} else {
    $set = $setQ->fetch();
    if (!$set) {
        $setQ->close();
        Error::fetch($setQ);
    }
    if (!isset($_GET["confirm"]) || $_GET["confirm"] != "yes") {
        echo HTML::para(sprintf(_("OpenClinic (version %s) is already installed."), $set->getVersion()));
        $setQ->close();
        echo Msg::warning(_("Are you sure you want to delete all clinic data and create new OpenClinic tables?"));
        echo Msg::warning(_("If you continue all data will be lost."));
        // @todo use fieldset
        echo HTML::start('form', array('method' => 'post', 'action' => $_SERVER['PHP_SELF'] . '?confirm=yes'));
        echo HTML::para(Form::button("continue", _("Continue")) . Form::generateToken());
        echo HTML::end('form');
        echo HTML::para(HTML::link(_("Cancel"), './index.php'));
        include_once "../layout/footer.php";
        exit;
    }
}
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:install.php

示例5: Query_History

    exit;
}
/**
 * Search database for problem
 */
$historyQ = new Query_History();
if (!$historyQ->selectPersonal($idPatient)) {
    $historyQ->close();
    FlashMsg::add(_("That patient does not exist."), OPEN_MSG_ERROR);
    header("Location: ../medical/patient_search_form.php");
    exit;
}
$history = $historyQ->fetch();
if (!$history) {
    $historyQ->close();
    Error::fetch($historyQ);
}
$historyQ->freeResult();
$historyQ->close();
unset($historyQ);
/**
 * Show page
 */
$title = _("View Personal Antecedents");
$titlePage = $patient->getName() . ' (' . $title . ')';
require_once "../layout/header.php";
/**
 * Breadcrumb
 */
$links = array(_("Medical Records") => "../medical/index.php", $patient->getName() => "../medical/patient_view.php", _("Clinic History") => "../medical/history_list.php", $title => "");
echo HTML::breadcrumb($links, "icon icon_patient");
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:history_personal_view.php

示例6: intval

Form::compareToken($returnLocation);
require_once "../model/Query/Staff.php";
/**
 * Retrieving post var
 */
$idMember = intval($_POST["id_member"]);
/**
 * Delete staff member
 */
$staffQ = new Query_Staff();
if (!$staffQ->select($idMember)) {
    $staffQ->close();
    FlashMsg::add(_("That staff member does not exist."), OPEN_MSG_ERROR);
    header("Location: " . $returnLocation);
    exit;
}
$staff = $staffQ->fetch();
if (!$staff) {
    $staffQ->close();
    Error::fetch($staffQ);
}
$staffQ->delete($staff->getIdMember(), $staff->getIdUser());
$info = trim($staff->getFirstName() . " " . $staff->getSurname1() . " " . $staff->getSurname2());
FlashMsg::add(sprintf(_("Staff member, %s, has been deleted."), $info));
$staffQ->close();
unset($staffQ);
unset($staff);
/**
 * Redirect to $returnLocation to avoid reload problem
 */
header("Location: " . $returnLocation);
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:staff_del.php

示例7: unset

unset($conn);
/**
 * Delete problem
 */
$problemQ = new Query_Page_Problem();
if (defined("OPEN_DEMO") && !OPEN_DEMO) {
    if (!$problemQ->select($idProblem)) {
        $problemQ->close();
        FlashMsg::add(_("That medical problem does not exist."), OPEN_MSG_ERROR);
        header("Location: " . $returnLocation);
        exit;
    }
    $problem = $problemQ->fetch();
    if (!$problem) {
        $problemQ->close();
        Error::fetch($problemQ);
    }
    $wording = $problem->getWording();
    $delProblemQ = new Query_DelProblem();
    $delProblemQ->insert($problem, $_SESSION['auth']['user_id'], $_SESSION['auth']['login_session']);
    unset($delProblemQ);
    unset($problem);
}
/**
 * Record log process (before deleting process)
 */
$recordQ = new Query_Page_Record();
$recordQ->log("Query_Page_Problem", "DELETE", array($idProblem));
$recordQ->close();
unset($recordQ);
$problemQ->delete($idProblem);
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:problem_del.php

示例8: log

 /**
  * void log(string $class, string, $operation, array $key, string $method = "select")
  *
  * Inserts a new record in log operations table if it is possible
  *
  * @param string $class
  * @param string $operation one between INSERT, UPDATE, DELETE
  * @param array $key primary key of the record
  * @param string $method (optional)
  * @return void
  * @access public
  * @since 0.8
  * @see OPEN_DEMO
  */
 function log($class, $operation, $key, $method = "select")
 {
     if (defined("OPEN_DEMO") && OPEN_DEMO) {
         return;
         // disabled in demo version
     }
     $queryQ = new $class();
     if (!call_user_func_array(array($queryQ, $method), $key)) {
         $queryQ->close();
         return;
     }
     $data = $queryQ->fetchRow();
     // obtains an array
     if (!$data) {
         $queryQ->close();
         Error::fetch($queryQ);
         return;
     }
     $data = serialize($data);
     $table = $queryQ->getTableName();
     $queryQ->close();
     unset($queryQ);
     $this->insert($_SESSION['auth']['user_id'], $_SESSION['auth']['login_session'], $table, $operation, $data);
 }
开发者ID:edubort,项目名称:openclinic-1,代码行数:38,代码来源:Record.php

示例9: unset

unset($set);
/**
 * i18n l10n (after OPEN_LANGUAGE is defined)
 */
require_once "../config/i18n.php";
if (isset($_GET["id_theme"]) && intval($_GET["id_theme"]) > 0) {
    include_once "../model/Query/Theme.php";
    /**
     * Reading theme settings
     */
    $themeQ = new Query_Theme();
    $themeQ->select(intval($_GET["id_theme"]));
    $theme = $themeQ->fetch();
    if (!$theme) {
        $themeQ->close();
        Error::fetch($themeQ);
    }
    $themeQ->freeResult();
    $themeQ->close();
    unset($themeQ);
    $_POST["theme_name"] = $theme->getName();
    $filename = '../css/' . $theme->getCssFile();
    $size = filesize($filename);
    $fp = fopen($filename, 'r');
    $_POST["css_rules"] = fread($fp, $size);
    fclose($fp);
    unset($theme);
}
if (isset($_POST["theme_name"]) && isset($_POST["css_rules"])) {
    /**
     * Theme related constants
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:theme_preview.php

示例10: Query_Setting

    include_once "../model/Query/Setting.php";
    $setQ = new Query_Setting();
    $setQ->select();
    $set = $setQ->fetch();
    if ($set) {
        $formVar["clinic_name"] = $set->getClinicName();
        $formVar["clinic_hours"] = $set->getClinicHours();
        $formVar["clinic_address"] = $set->getClinicAddress();
        $formVar["clinic_phone"] = $set->getClinicPhone();
        $formVar["clinic_url"] = $set->getClinicUrl();
        $formVar["language"] = $set->getLanguage();
        $formVar["id_theme"] = $set->getIdTheme();
        $formVar["session_timeout"] = $set->getSessionTimeout();
        $formVar["items_per_page"] = $set->getItemsPerPage();
    } else {
        Error::fetch($setQ, false);
    }
    $setQ->freeResult();
    $setQ->close();
    unset($setQ);
    unset($set);
}
/**
 * Show page
 */
$title = _("Config settings");
$focusFormField = "session_timeout";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
 * Breadcrumb
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:setting_edit_form.php

示例11: header

        $userQ->close();
        FlashMsg::add(_("That user does not exist."), OPEN_MSG_ERROR);
        header("Location: " . $returnLocation);
        exit;
    }
    $user = $userQ->fetch();
    if ($user) {
        $formVar["id_user"] = $idUser;
        $formVar["id_member"] = $user->getIdMember();
        $formVar["login"] = $user->getLogin();
        $formVar["email"] = $user->getEmail();
        $formVar["actived"] = $user->isActived() ? "checked" : "";
        $formVar["id_theme"] = $user->getIdTheme();
        $formVar["id_profile"] = $user->getIdProfile();
    } else {
        Error::fetch($userQ, false);
    }
    $userQ->freeResult();
    $userQ->close();
    unset($userQ);
    unset($user);
}
/**
 * Show page
 */
$title = isset($_GET["all"]) ? _("Change User Data") : _("Edit User");
$focusFormField = "email";
// to avoid JavaScript mistakes in demo version
require_once "../layout/header.php";
/**
 * Breadcrumb
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:user_edit_form.php

示例12: unset

        exit;
    }
    $staff = $staffQ->fetch();
    if ($staff) {
        $formVar["id_member"] = $idMember;
        $formVar["member_type"] = $staff->getMemberType();
        $formVar["collegiate_number"] = $staff->getCollegiateNumber();
        $formVar["nif"] = $staff->getNIF();
        $formVar["first_name"] = $staff->getFirstName();
        $formVar["surname1"] = $staff->getSurname1();
        $formVar["surname2"] = $staff->getSurname2();
        $formVar["address"] = $staff->getAddress();
        $formVar["phone_contact"] = $staff->getPhone();
        $formVar["login"] = $staff->getLogin();
    } else {
        Error::fetch($staffQ, false);
    }
    $staffQ->freeResult();
    $staffQ->close();
    unset($staffQ);
    unset($staff);
}
/**
 * Show page
 */
switch (substr($formVar["member_type"], 0, 1)) {
    case "A":
        $title = _("Edit Administrative Information");
        break;
    case "D":
        $title = _("Edit Doctor Information");
开发者ID:edubort,项目名称:openclinic-1,代码行数:31,代码来源:staff_edit_form.php


注:本文中的Error::fetch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。