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


PHP DisplayErrMsg函数代码示例

本文整理汇总了PHP中DisplayErrMsg函数的典型用法代码示例。如果您正苦于以下问题:PHP DisplayErrMsg函数的具体用法?PHP DisplayErrMsg怎么用?PHP DisplayErrMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: Query

function Query($query)
{
    global $link;
    if (!($result = mysql_query($query, $link))) {
        $ErrMsg = "Bad query to database {$DBName}: Error Number " . mysql_errno() . "<br>" . mysql_error();
        DisplayErrMsg($ErrMsg);
        echo "The bad query is {$query}\n";
        exit;
    }
    return $result;
}
开发者ID:4cylinder,项目名称:uoftscheduler,代码行数:11,代码来源:functions.php

示例2: mysqli

require "../globals.php";
require "./common.php";
require "./php/includes/setup.php";
$table_selector_category = 'selector_categorie';
$category_Stmt = "SELECT * from {$table_selector_category}\n                  order by {$table_selector_category}.omschrijving";
// Connect to the Database
$link = new mysqli($hostName, $userName, $password, $databaseName);
/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit;
}
if (!($result_category = $link->query($category_Stmt))) {
    DisplayErrMsg(sprintf("Error in executing %s stmt", $category_Stmt));
    DisplayErrMsg(sprintf("error: %s", $link->error));
    exit;
}
$table_category = '';
$j = 0;
while ($field_category = $result_category->fetch_object()) {
    $b = $j % 2;
    $bgcolor = '';
    if ($b == 0) {
        $bgcolor = '#B8E7FF';
    }
    $table_data = new Smarty_NM();
    if ($j == 0) {
        $table_category = $table_data->fetch("category_header.tpl");
    }
    $action = sprintf("new_category.php?pk=%d&t=%d", $field_category->pk, time());
开发者ID:jhuguetn,项目名称:WAD_Interface,代码行数:30,代码来源:create_category.php

示例3: Smarty_NM

//Instance
if ($constraint == 'Add_Instance' || $constraint == 'Modify_Instance') {
    $instance = new Smarty_NM();
    if ($selector_instance_fk <= 0) {
        $table_instance = $instance->fetch("constraint_instance.tpl");
    }
    if ($selector_instance_fk > 0) {
        $table_instance = 'selector_instance';
        $instance_Stmt = "SELECT * from {$table_instance} where\n    {$table_instance}.pk='{$selector_instance_fk}'";
        if (!($result_instance = $link->query($instance_Stmt))) {
            DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt));
            DisplayErrMsg(sprintf("error: %s", $link->error));
            exit;
        }
        if (!($field_instance = $result_instance->fetch_object())) {
            DisplayErrMsg("Internal error: the entry does not exist");
            exit;
        }
        //personal_instance
        $table_instance = '';
        $instance->assign("default_sop_iuid", $field_instance->sop_iuid);
        $instance->assign("default_sop_cuid", $field_instance->sop_cuid);
        $instance->assign("default_inst_no", $field_instance->inst_no);
        $instance->assign("default_content_datetime", $field_instance->content_datetime);
        $instance->assign("default_sr_complete", $field_instance->sr_complete);
        $instance->assign("default_sr_verified", $field_instance->sr_verified);
        $instance->assign("default_inst_custom1", $field_instance->inst_custom1);
        $instance->assign("default_inst_custom2", $field_instance->inst_custom2);
        $instance->assign("default_inst_custom3", $field_instance->inst_custom3);
        $instance->assign("default_ext_retr_aet", $field_instance->ext_retr_aet);
        $instance->assign("default_retrieve_aets", $field_instance->retrieve_aets);
开发者ID:JaapGroen,项目名称:WAD_Interface,代码行数:31,代码来源:constraint.php

示例4: DisplayErrMsg

$updateStmt = "Update {$tableName} set NAME='{$cn}', EMAIL='{$mail}', CITY='{$locality}',\nDESCRIPTION='{$description}', TELEPHONE='{$telephonenumber}' WHERE ROWID='{$rowid}'";
//echo "updatstmt= $updateStmt";
// open a pesistent connection with database server
if (!($link = mysql_pconnect($hostName, $userName, $password))) {
    DisplayErrMsg(sprintf("error connecting to host %s, by user %s", $hostName, $userName));
    exit;
}
//select the database
if (!mysql_select_db($databaseName, $link)) {
    DisplayErrMsg(sprintf("error in selecting  %s database", $databaseName));
    DisplayErrMsg(sprintf("error: %d %s", mysql_errno($link), mysql_error($link)));
    exit;
}
if (!mysql_query($updateStmt, $link)) {
    DisplayErrMsg(sprintf("error in executing %s stmt", $updateStmt));
    DisplayErrMsg(sprintf("error: %d %s", mysql_errno($link), mysql_error($link)));
    //echo "failed";
    exit;
}
GenerateHTMLHeader("The Entry was modified successfully");
ReturnToMain();
?>

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title></title>
    </head>
    <body>
        
开发者ID:bhami,项目名称:myAddressBook,代码行数:30,代码来源:update.php

示例5: check_qc_frequency

function check_qc_frequency($link, $gewenste_processen_array)
{
    if (empty($gewenste_processen_array)) {
        return -1;
    }
    $gewenste_processen = implode(",", $gewenste_processen_array);
    $query = "SELECT creation_time,qc_frequentie from gewenste_processen \n             inner join selector on gewenste_processen.selector_fk=selector.pk\n             where gewenste_processen.pk in ({$gewenste_processen})";
    if (!($result = $link->query($query))) {
        DisplayErrMsg(sprintf("Error in executing %s stmt", $query));
        DisplayErrMsg(sprintf("error: %s", $link->error));
        exit;
    }
    $qc_freq_status = true;
    while ($field = $result->fetch_object()) {
        if ((strtotime(date("Y-m-d H:i:s")) - strtotime($field->creation_time)) / (60 * 60 * 24) > $field->qc_frequentie) {
            $qc_freq_status = false;
        }
    }
    return $qc_freq_status;
}
开发者ID:JaapGroen,项目名称:WAD_Interface,代码行数:20,代码来源:show_dashboard.php

示例6: selector_function_pssi

function selector_function_pssi($pk, $selector_patient_pk, $selector_study_pk, $selector_series_pk, $selector_instance_pk, &$table_pssi)
{
    require "../globals.php";
    //require("./php/includes/setup.php");
    // Connect to the Database
    $link = new mysqli($hostName, $userName, $password, $databaseName);
    /* check connection */
    if (mysqli_connect_errno()) {
        printf("Connect failed: %s\n", mysqli_connect_error());
        exit;
    }
    $patient_header = "";
    $study_header = "";
    $series_header = "";
    $instance_header = "";
    if ($selector_patient_pk > 0) {
        $patient_header = "Patient";
        $patient = new Smarty_NM();
        $table_patient = 'selector_patient';
        $patient_Stmt = "SELECT * from {$table_patient} where\n      {$table_patient}.pk='{$selector_patient_pk}'";
        if (!($result_patient = $link->query($patient_Stmt))) {
            DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt));
            DisplayErrMsg(sprintf("error: %s", $link->error));
            exit;
        }
        if (!($field_patient = $result_patient->fetch_object())) {
            DisplayErrMsg("Internal error: the entry does not exist");
            exit;
        }
        //personal_patient
        $table_patient = '';
        $patient->assign("default_pat_id", $field_patient->pat_id);
        $patient->assign("default_pat_id_issuer", $field_patient->pat_id_issuer);
        $patient->assign("default_pat_name", $field_patient->pat_name);
        $patient->assign("default_pat_fn_sx", $field_patient->pat_fn_sx);
        $patient->assign("default_pat_gn_sx", $field_patient->pat_gn_sx);
        $patient->assign("default_pat_i_name", $field_patient->pat_i_name);
        $patient->assign("default_pat_p_name", $field_patient->pat_p_name);
        $patient->assign("default_pat_birthdate", $field_patient->pat_birthdate);
        $patient->assign("default_pat_sex", $field_patient->pat_sex);
        $patient->assign("default_pat_custom1", $field_patient->pat_custom1);
        $patient->assign("default_pat_custom2", $field_patient->pat_custom2);
        $patient->assign("default_pat_custom3", $field_patient->pat_custom3);
        $result_patient->close();
        $table_patient = $patient->fetch("selector_patient.tpl");
    }
    // end patient_ref
    if ($selector_study_pk > 0) {
        $study_header = "Study";
        $study = new Smarty_NM();
        $table_study = 'selector_study';
        $study_Stmt = "SELECT * from {$table_study} where\n      {$table_study}.pk='{$selector_study_pk}'";
        if (!($result_study = $link->query($study_Stmt))) {
            DisplayErrMsg(sprintf("Error in executing %s stmt", $student_Stmt));
            DisplayErrMsg(sprintf("error: %s", $link->error));
            exit;
        }
        if (!($field_study = $result_study->fetch_object())) {
            DisplayErrMsg("Internal error: the entry does not exist");
            exit;
        }
        //personal_study
        $table_study = '';
        $study->assign("default_study_iuid", $field_study->study_iuid);
        $study->assign("default_study_id", $field_study->study_id);
        $study->assign("default_study_datetime", $field_study->study_datetime);
        $study->assign("default_accession_no", $field_study->accession_no);
        $study->assign("default_ref_physician", $field_study->ref_physician);
        $study->assign("default_ref_phys_fn_sx", $field_study->ref_phys_fn_sx);
        $study->assign("default_ref_phys_gn_sx", $field_study->ref_phys_gn_sx);
        $study->assign("default_ref_phys_i_name", $field_study->ref_phys_i_name);
        $study->assign("default_ref_phys_p_name", $field_study->ref_phys_p_name);
        $study->assign("default_study_desc", $field_study->study_desc);
        $study->assign("default_study_custom1", $field_study->study_custom1);
        $study->assign("default_study_custom2", $field_study->study_custom2);
        $study->assign("default_study_custom3", $field_study->study_custom3);
        $study->assign("default_study_status_id", $field_study->study_status_id);
        $study->assign("default_mods_in_study", $field_study->mods_in_study);
        $study->assign("default_cuids_in_study", $field_study->cuids_in_study);
        $study->assign("default_num_series", $field_study->num_series);
        $study->assign("default_num_instances", $field_study->num_instances);
        $study->assign("default_ext_retr_aet", $field_study->ext_retr_aet);
        $study->assign("default_retrieve_aets", $field_study->retrieve_aets);
        $study->assign("default_fileset_iuid", $field_study->fileset_iuid);
        $study->assign("default_fileset_id", $field_study->fileset_id);
        $study->assign("default_availability", $field_study->availability);
        $study->assign("default_study_status", $field_study->study_status);
        $study->assign("default_checked_time", $field_study->checked_time);
        $study->assign("default_updated_time", $field_study->updated_time);
        $study->assign("default_created_time", $field_study->created_time);
        $study->assign("default_updated_time", $field_study->updated_time);
        $study->assign("default_study_attrs", $field_study->study_attrs);
        $result_study->close();
        $table_study = $study->fetch("selector_study.tpl");
    }
    // end study_ref
    if ($selector_series_pk > 0) {
        $series_header = "Series";
        $series = new Smarty_NM();
        $table_series = 'selector_series';
//.........这里部分代码省略.........
开发者ID:JaapGroen,项目名称:WAD_Interface,代码行数:101,代码来源:selector_function.php


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