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


PHP pmb_mysql_error函数代码示例

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


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

示例1: traite_rqt

function traite_rqt($requete = "", $message = "")
{
    global $dbh, $charset;
    $retour = "";
    /*if($charset == "utf-8"){ //Contrairement au addon ce n'est pas à faire car dans les fichiers alter_vX.inc.php on fait un set names latin1
    		$requete=utf8_encode($requete);
    	}*/
    $res = pmb_mysql_query($requete, $dbh);
    $erreur_no = pmb_mysql_errno();
    if (!$erreur_no) {
        $retour = "Successful";
    } else {
        switch ($erreur_no) {
            case "1060":
                $retour = "Field already exists, no problem.";
                break;
            case "1061":
                $retour = "Key already exists, no problem.";
                break;
            case "1091":
                $retour = "Object already deleted, no problem.";
                break;
            default:
                $retour = "<font color=\"#FF0000\">Error may be fatal : <i>" . pmb_mysql_error() . "<i></font>";
                break;
        }
    }
    return "<tr><td><font size='1'>" . ($charset == "utf-8" ? utf8_encode($message) : $message) . "</font></td><td><font size='1'>" . $retour . "</font></td></tr>";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:alter.php

示例2: getData

 function getData()
 {
     global $dbh;
     if (!$this->s_id) {
         // pas d'identifiant. on retourne un tableau vide
         $this->s_id = 0;
         $this->name = '';
         $this->index = '';
         $this->num_statut = 1;
     } else {
         $requete = "SELECT * FROM series WHERE serie_id='" . $this->s_id . "' ";
         $result = pmb_mysql_query($requete, $dbh) or die($requete . "<br />" . pmb_mysql_error());
         if (pmb_mysql_num_rows($result)) {
             $temp = pmb_mysql_fetch_object($result);
             $this->s_id = $temp->serie_id;
             $this->name = $temp->serie_name;
             $this->index = $temp->serie_index;
             $authority = new authority(0, $this->s_id, AUT_TABLE_SERIES);
             $this->num_statut = $authority->get_num_statut();
             // Ajoute un lien sur la fiche série si l'utilisateur à accès aux autorités
             if (SESSrights & AUTORITES_AUTH) {
                 //$this->isbd_entry_lien_gestion = "<a href='./autorites.php?categ=series&sub=serie_form&id=".$this->s_id."' class='lien_gestion'>".$this->name."</a>";
                 $this->isbd_entry_lien_gestion = "<a href='./autorites.php?categ=see&sub=serie&id=" . $this->s_id . "' class='lien_gestion'>" . $this->name . "</a>";
             } else {
                 $this->isbd_entry_lien_gestion = $this->name;
             }
         } else {
             // pas de titre avec cette clé
             $this->s_id = 0;
             $this->name = '';
             $this->index = '';
             $this->num_statut = 1;
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:35,代码来源:serie.class.php

示例3: getData

 function getData()
 {
     global $dbh;
     if (!$this->indexint_id) {
         if ($this->name) {
             // rech par cote et non par $id
             $requete = "SELECT indexint_id,indexint_name,indexint_comment,num_pclass FROM indexint WHERE indexint_name='" . $this->name . "' ";
             $result = pmb_mysql_query($requete, $dbh) or die($requete . "<br />" . pmb_mysql_error());
             if (pmb_mysql_num_rows($result)) {
                 $temp = pmb_mysql_fetch_object($result);
                 $this->indexint_id = $temp->indexint_id;
                 $this->name = $temp->indexint_name;
                 $this->comment = $temp->indexint_comment;
                 $this->pclass = $temp->num_pclass;
                 if ($this->comment) {
                     $this->display = $this->name . " ({$this->comment})";
                 } else {
                     $this->display = $this->name;
                 }
             } else {
                 // pas de titre avec cette clé
                 $this->indexint_id = 0;
                 $this->name = '';
                 $this->comment = '';
                 $this->pclass = 0;
                 $this->display = "";
             }
         } else {
             // pas d'identifiant. on retourne un tableau vide
             $this->indexint_id = 0;
             $this->name = '';
             $this->comment = '';
             $this->pclass = 0;
             $this->display = "";
         }
     } else {
         $requete = "SELECT indexint_id,indexint_name,indexint_comment,num_pclass FROM indexint WHERE indexint_id='" . $this->indexint_id . "' ";
         $result = pmb_mysql_query($requete, $dbh) or die($requete . "<br />" . pmb_mysql_error());
         if (pmb_mysql_num_rows($result)) {
             $temp = pmb_mysql_fetch_object($result);
             $this->indexint_id = $temp->indexint_id;
             $this->name = $temp->indexint_name;
             $this->comment = $temp->indexint_comment;
             $this->pclass = $temp->num_pclass;
             if ($this->comment) {
                 $this->display = $this->name . " ({$this->comment})";
             } else {
                 $this->display = $this->name;
             }
         } else {
             // pas de titre avec cette clé
             $this->indexint_id = 0;
             $this->name = '';
             $this->comment = '';
             $this->pclass = 0;
             $this->display = "";
         }
     }
     $this->cherche_child();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:60,代码来源:indexint.class.php

示例4: traite_rqt

function traite_rqt($requete = "", $message = "")
{
    global $dbh, $charset;
    $retour = "";
    if ($charset == "utf-8") {
        $requete = utf8_encode($requete);
    }
    $res = pmb_mysql_query($requete, $dbh);
    $erreur_no = pmb_mysql_errno();
    if (!$erreur_no) {
        $retour = "Successful";
    } else {
        switch ($erreur_no) {
            case "1060":
                $retour = "Field already exists, no problem.";
                break;
            case "1061":
                $retour = "Key already exists, no problem.";
                break;
            case "1091":
                $retour = "Object already deleted, no problem.";
                break;
            default:
                $retour = "<font color=\"#FF0000\">Error may be fatal : <i>" . pmb_mysql_error() . "<i></font>";
                break;
        }
    }
    return "<tr><td><font size='1'>" . ($charset == "utf-8" ? utf8_encode($message) : $message) . "</font></td><td><font size='1'>" . $retour . "</font></td></tr>";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:addon.inc.php

示例5: cpt_transferts

function cpt_transferts($clause_where)
{
    global $deflt_docs_location;
    global $msg;
    $rqt = "SELECT 1 " . "FROM transferts " . "INNER JOIN transferts_demande ON id_transfert = num_transfert " . "WHERE " . $clause_where . " " . "LIMIT 1";
    //echo $rqt."<br />";
    $req = pmb_mysql_query($rqt) or die($msg["err_sql"] . "<br />" . $rqt . "<br />" . pmb_mysql_error());
    $nb_limite = pmb_mysql_num_rows($req);
    return $nb_limite;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:10,代码来源:transferts.inc.php

示例6: my_error

function my_error($echo = 1)
{
    if (!pmb_mysql_errno()) {
        return "";
    }
    $erreur = 'erreur ' . pmb_mysql_errno() . ' : ' . pmb_mysql_error() . '<br />';
    if ($echo) {
        echo $erreur;
    } else {
        trigger_error($erreur, E_USER_ERROR);
        return $erreur;
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:13,代码来源:mysql_connect.inc.php

示例7: alerte_demandes

function alerte_demandes()
{
    global $dbh;
    global $msg;
    // comptage des demandes à valider
    $sql = " SELECT 1 FROM demandes where etat_demande=1 limit 1";
    $req = pmb_mysql_query($sql) or die($msg["err_sql"] . "<br />" . $sql . "<br />" . pmb_mysql_error());
    $nb_limite = pmb_mysql_num_rows($req);
    if (!$nb_limite) {
        return "";
    } else {
        return "<li><a href='./demandes.php?categ=list&idetat=1' target='_parent'>{$msg['alerte_demandes_traiter']}</a></li>";
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:14,代码来源:demandes.inc.php

示例8: get_info_surloc_from_location

 static function get_info_surloc_from_location($id_docs_location = 0)
 {
     global $dbh;
     if ($id_docs_location) {
         $requete = "SELECT * FROM docs_location where idlocation='{$id_docs_location}'";
         $res = pmb_mysql_query($requete, $dbh) or die(pmb_mysql_error() . "<br />{$requete}");
         if (pmb_mysql_num_rows($res)) {
             $row = pmb_mysql_fetch_object($res);
             if ($row->surloc_num) {
                 $sur_loc = new sur_location($row->surloc_num);
                 return $sur_loc;
             }
         }
     }
     return $sur_loc = new sur_location();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:16,代码来源:sur_location.class.php

示例9: expl_retour_todo

function expl_retour_todo()
{
    global $dbh;
    global $msg;
    global $deflt_docs_location;
    if (!$deflt_docs_location) {
        return "";
    }
    $sql = "SELECT expl_id FROM exemplaires where expl_retloc='{$deflt_docs_location}' limit 1";
    $req = pmb_mysql_query($sql) or die($msg["err_sql"] . "<br />" . $sql . "<br />" . pmb_mysql_error());
    $nb = pmb_mysql_num_rows($req);
    if (!$nb) {
        return "";
    } else {
        return "<li><a href='./circ.php?categ=ret_todo' target='_parent'>" . $msg["alert_circ_retour_todo"] . "</a></li>";
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:17,代码来源:expl_todo.inc.php

示例10: alerte_sugg

function alerte_sugg()
{
    global $dbh;
    global $msg;
    global $opac_show_suggest;
    if (!$opac_show_suggest) {
        return "";
    }
    // comptage des tags à valider
    $sql = " SELECT 1 FROM suggestions where statut=1 limit 1";
    $req = pmb_mysql_query($sql) or die($msg["err_sql"] . "<br />" . $sql . "<br />" . pmb_mysql_error());
    $nb_limite = pmb_mysql_num_rows($req);
    if (!$nb_limite) {
        return "";
    } else {
        return "<li><a href='./acquisition.php?categ=sug&action=list&statut=1' target='_parent'>{$msg['alerte_suggestion_traiter']}</a></li>";
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:18,代码来源:sugg.inc.php

示例11: alerte_avis

function alerte_avis()
{
    global $dbh;
    global $msg;
    global $opac_avis_allow;
    if (!$opac_avis_allow) {
        return "";
    }
    // comptage des avis à valider
    $sql = " SELECT 1 FROM avis where valide=0 limit 1";
    $req = pmb_mysql_query($sql) or die($msg["err_sql"] . "<br />" . $sql . "<br />" . pmb_mysql_error());
    $nb_depasse = pmb_mysql_num_rows($req);
    if (!$nb_depasse) {
        return "";
    } else {
        return "<li><a href='./catalog.php?categ=avis' target='_parent'>{$msg['alerte_avis_a_valider']}</a></li>";
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:18,代码来源:tag.inc.php

示例12: get_info_expl

function get_info_expl($cb_doc)
{
    global $dbh, $msg;
    $requete = "SELECT notices_m.notice_id as m_id, notices_s.notice_id as s_id, expl_cb, expl_cote, expl_location,pret_date, pret_retour, tdoc_libelle, section_libelle, location_libelle, trim(concat(ifnull(notices_m.tit1,''),ifnull(notices_s.tit1,''),' ',ifnull(bulletin_numero,''), if (mention_date, concat(' (',mention_date,')') ,''))) as tit, ";
    $requete .= " date_format(pret_date, '" . $msg["format_date"] . "') as aff_pret_date, ";
    $requete .= " date_format(pret_retour, '" . $msg["format_date"] . "') as aff_pret_retour, ";
    $requete .= " IF(pret_retour>sysdate(),0,1) as retard, notices_m.tparent_id, notices_m.tnvol ";
    $requete .= " FROM (((exemplaires LEFT JOIN notices AS notices_m ON expl_notice = notices_m.notice_id ) LEFT JOIN bulletins ON expl_bulletin = bulletins.bulletin_id) LEFT JOIN notices AS notices_s ON bulletin_notice = notices_s.notice_id), docs_type, docs_section, docs_location, pret ";
    $requete .= " WHERE expl_cb='" . $cb_doc . "' and expl_typdoc = idtyp_doc and expl_section = idsection and expl_location = idlocation and pret_idexpl = expl_id  ";
    $res = pmb_mysql_query($requete, $dbh) or die("<br />" . pmb_mysql_error());
    $expl = pmb_mysql_fetch_object($res);
    $responsabilites = get_notice_authors($expl->m_id + $expl->s_id);
    $as = array_search("0", $responsabilites["responsabilites"]);
    if ($as !== FALSE && $as !== NULL) {
        $auteur_0 = $responsabilites["auteurs"][$as];
        $auteur = new auteur($auteur_0["id"]);
        $header_aut .= $auteur->isbd_entry;
    } else {
        $aut1_libelle = array();
        $as = array_keys($responsabilites["responsabilites"], "1");
        for ($i = 0; $i < count($as); $i++) {
            $indice = $as[$i];
            $auteur_1 = $responsabilites["auteurs"][$indice];
            $auteur = new auteur($auteur_1["id"]);
            $aut1_libelle[] = $auteur->isbd_entry;
        }
        $header_aut .= implode(", ", $aut1_libelle);
    }
    $header_aut ? $auteur = " / " . $header_aut : ($auteur = "");
    $expl->header_aut = $header_aut;
    // récupération du titre de série
    if ($expl->tparent_id && $expl->m_id) {
        $parent = new serie($expl->tparent_id);
        $tit_serie = $parent->name;
        if ($expl->tnvol) {
            $tit_serie .= ', ' . $expl->tnvol;
        }
    }
    if ($tit_serie) {
        $expl->tit = $tit_serie . '. ' . $expl->tit;
    }
    return $expl;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:43,代码来源:func.inc.php

示例13: add_days

 static function add_days($dd, $md, $yd, $days)
 {
     global $pmb_utiliser_calendrier;
     global $deflt2docs_location;
     if ($pmb_utiliser_calendrier) {
         $requete = "select min(date_ouverture) from ouvertures where ouvert=1 and num_location={$deflt2docs_location} and date_ouverture>=adddate('" . $yd . "-" . $md . "-" . $dd . "', interval {$days} day)";
         $resultat = pmb_mysql_query($requete) or die($requete . " " . pmb_mysql_error());
         if (!@pmb_mysql_num_rows($resultat)) {
             $requete = "select adddate('" . $yd . "-" . $md . "-" . $dd . "', interval {$days} day)";
             $resultat = pmb_mysql_query($requete) or die($requete . " " . pmb_mysql_error());
         }
         if ($date = pmb_mysql_result($resultat, 0, 0)) {
             return $date;
         }
     }
     $requete = "select adddate('" . $yd . "-" . $md . "-" . $dd . "', interval {$days} day)";
     $resultat = pmb_mysql_query($requete) or die($requete . " " . pmb_mysql_error());
     $date = pmb_mysql_result($resultat, 0, 0);
     return $date;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:20,代码来源:calendar.class.php

示例14: empr_categ_change

function empr_categ_change()
{
    global $dbh;
    global $msg;
    global $pmb_lecteurs_localises, $deflt2docs_location;
    // comptage des emprunteurs qui n'ont pas le droit d'être dans la catégorie
    $sql = "select 1 from empr left join empr_categ on empr_categ = id_categ_empr ";
    $sql .= " where ((((age_min<> 0) || (age_max <> 0)) && (age_max >= age_min)) && (((DATE_FORMAT( curdate() , '%Y' )-empr_year) < age_min) || ((DATE_FORMAT( curdate() , '%Y' )-empr_year) > age_max)))";
    // restriction localisation le cas échéant
    if ($pmb_lecteurs_localises) {
        $sql .= " AND empr_location='{$deflt2docs_location}' ";
    }
    $req = pmb_mysql_query($sql) or die($msg["err_sql"] . "<br />" . $sql . "<br />" . pmb_mysql_error());
    $nb_change = pmb_mysql_num_rows($req);
    if (!$nb_change) {
        return "";
    } else {
        return "<li><a href='./edit.php?categ=empr&sub=categ_change' target='_parent'>{$msg['empr_change_categ_todo']}</a></li>";
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:20,代码来源:empr.inc.php

示例15: getData

 function getData()
 {
     global $dbh;
     if ($this->idlender == "") {
         // pas d'identifiant. on retourne un tableau vide
         $this->idlender = 0;
         $this->lender_libelle = "";
     } else {
         $requete = "SELECT idlender, lender_libelle FROM lenders WHERE idlender='" . $this->idlender . "' LIMIT 1 " or die(pmb_mysql_error());
         $result = pmb_mysql_query($requete, $dbh);
         if (pmb_mysql_num_rows($result)) {
             $temp = pmb_mysql_fetch_object($result);
             $this->idlender = $temp->idlender;
             $this->lender_libelle = $temp->lender_libelle;
         } else {
             // pas de lender avec cette clé
             $this->idlender = 0;
             $this->lender_libelle = "";
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:21,代码来源:lender.class.php


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