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


PHP pmb_mysql_result函数代码示例

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


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

示例1: list_esgroups

function list_esgroups()
{
    global $msg, $charset, $dbh;
    $esgroups = new es_esgroups();
    print "<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>" . $msg["es_group_name"] . "</th>\n\t\t\t\t\t<th>" . $msg["es_group_fullname"] . "</th>\n\t\t\t\t\t<th>" . $msg["connector_out_authorization_authorizedsourcecount"] . "</th>\n\t\t\t\t</tr>";
    //Ajoutons l'utilisateur anonyme
    $sql = "SELECT COUNT(1) FROM connectors_out_sources_esgroups WHERE connectors_out_source_esgroup_esgroupnum = -1";
    $anonymous_count = pmb_mysql_result(pmb_mysql_query($sql, $dbh), 0, 0);
    $pair_impair = "odd";
    $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./admin.php?categ=connecteurs&sub=out_auth&action=editanonymous'\" ";
    print "\t\t<tr style='cursor: pointer' class='{$pair_impair}' {$tr_javascript}>\n\t\t\t\t\t<td>&lt;" . $msg["admin_connecteurs_outauth_anonymgroupname"] . "&gt;</td>\n\t\t\t\t\t<td>" . $msg["admin_connecteurs_outauth_anonymgroupfullname"] . "</td>\n\t\t\t\t\t<td>" . $anonymous_count . "</td>\n\t\t\t\t</tr>";
    $parity = 1;
    foreach ($esgroups->groups as &$aesgroup) {
        //Récupérons le nombre de sources autorisées dans le groupe
        $sql = "SELECT COUNT(1) FROM connectors_out_sources_esgroups WHERE connectors_out_source_esgroup_esgroupnum = " . $aesgroup->esgroup_id;
        $count = pmb_mysql_result(pmb_mysql_query($sql, $dbh), 0, 0);
        $pair_impair = $parity++ % 2 ? 'even' : 'odd';
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./admin.php?categ=connecteurs&sub=out_auth&action=edit&id={$aesgroup->esgroup_id}';\" ";
        print "<tr style='cursor: pointer' class='{$pair_impair}' {$tr_javascript}>";
        print "<td>" . htmlentities($aesgroup->esgroup_name, ENT_QUOTES, $charset) . "</td>";
        print "<td>" . htmlentities($aesgroup->esgroup_fullname, ENT_QUOTES, $charset) . "</td>";
        print "<td>" . $count . "</td>";
        print "</tr>";
    }
    print "</table>";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:out_auth.inc.php

示例2: get_qty

 static function get_qty()
 {
     global $dbh;
     $q = "select count(1) from demandes_type";
     $r = pmb_mysql_query($q, $dbh);
     return pmb_mysql_result($r, 0, 0);
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:7,代码来源:demandes_types.class.php

示例3: listBannettesAuto

 function listBannettesAuto($filtre_search = "", $id_classement = 0)
 {
     global $dbh;
     if (SESSrights & DSI_AUTH) {
         $result = array();
         //auto = 1 : bannettes automatiques sans contrôle de date
         $auto = 1;
         $filtre_search = str_replace("*", "%", $filtre_search);
         if ($filtre_search) {
             $clause = "WHERE nom_bannette like '{$filtre_search}%' and bannette_auto='{$auto}' ";
         } else {
             $clause = "WHERE bannette_auto='{$auto}' ";
         }
         //			if ($id_classement!=0) $clause.= " and num_classement=0 ";
         if ($id_classement > 0) {
             $clause .= " and num_classement='{$id_classement}' ";
         }
         $requete = "SELECT COUNT(1) FROM bannettes {$clause} ";
         $res = pmb_mysql_query($requete, $dbh);
         $nbr_lignes = pmb_mysql_result($res, 0, 0);
         if ($nbr_lignes) {
             $requete = "SELECT id_bannette, nom_bannette, date_last_remplissage, date_last_envoi, proprio_bannette, bannette_auto, nb_notices_diff FROM bannettes {$clause} ORDER BY nom_bannette, id_bannette ";
             $res = pmb_mysql_query($requete, $dbh);
             while ($row = pmb_mysql_fetch_assoc($res)) {
                 $result[] = array("id_bannette" => $row["id_bannette"], "nom_bannette" => utf8_normalize($row["nom_bannette"]), "date_last_remplissage" => $row["date_last_remplissage"], "date_last_envoi" => $row["date_last_envoi"], "proprio_bannette" => $row["proprio_bannette"], "bannette_auto" => $row["bannette_auto"], "nb_notices_diff" => $row["nb_notices_diff"]);
             }
         }
         return $result;
     } else {
         return array();
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:32,代码来源:pmbesDSI.class.php

示例4: param_perso_form

function param_perso_form(&$p_perso)
{
    global $dbh;
    global $param_perso_900;
    for ($i = 0; $i < count($param_perso_900); $i++) {
        $req = " select idchamp, type, datatype from notices_custom where name='" . $param_perso_900[$i]['n'] . "'";
        $res = pmb_mysql_query($req, $dbh);
        if (pmb_mysql_num_rows($res)) {
            $perso = pmb_mysql_fetch_object($res);
            if ($perso->idchamp) {
                if ($perso->type == 'list') {
                    $requete = "select notices_custom_list_value from notices_custom_lists where notices_custom_list_lib='" . addslashes($param_perso_900[$i]['a']) . "' and notices_custom_champ={$perso->idchamp}";
                    $resultat = pmb_mysql_query($requete);
                    if (pmb_mysql_num_rows($resultat)) {
                        $value = pmb_mysql_result($resultat, 0, 0);
                    } else {
                        $requete = "select max(notices_custom_list_value*1) from notices_custom_lists where notices_custom_champ={$perso->idchamp}";
                        $resultat = pmb_mysql_query($requete);
                        $max = @pmb_mysql_result($resultat, 0, 0);
                        $n = $max + 1;
                        $requete = "insert into notices_custom_lists (notices_custom_champ,notices_custom_list_value,notices_custom_list_lib) values({$perso->idchamp},{$n},'" . addslashes($param_perso_900[$i]['a']) . "')";
                        pmb_mysql_query($requete);
                        $value = $n;
                    }
                    $p_perso->values[$perso->idchamp][] = $value;
                } else {
                    $p_perso->values[$perso->idchamp][] = $param_perso_900[$i]['a'];
                }
            }
        }
    }
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:32,代码来源:func_customfields.inc.php

示例5: list_views

 function list_views()
 {
     global $dbh;
     //A l'INRA, 2 vues de base par utilisateur...
     //	- celle de son centre
     //  - la vue nationale
     //Vue nationale par défaut
     $this->opac_views_list[] = 21;
     $this->view_list_empr_default = 21;
     //Récupération du centre de l'emprunteur
     if ($this->id_empr) {
         $myQuery = pmb_mysql_query("select empr_custom_integer from empr_custom_values where empr_custom_origine=" . $this->id_empr . " and empr_custom_champ=15");
         if (pmb_mysql_num_rows($myQuery)) {
             $sql = "select opac_view_visible from opac_views where opac_view_id = " . $this->corresp_centres[pmb_mysql_result($myQuery, 0, 0)];
             $res = pmb_mysql_query($sql);
             if (pmb_mysql_num_rows($res)) {
                 if (pmb_mysql_result($res, 0, 0) > 0) {
                     $this->opac_views_list[] = $this->corresp_centres[pmb_mysql_result($myQuery, 0, 0)];
                 }
             }
         }
     }
     //+ les vues publiques
     $myQuery = pmb_mysql_query("SELECT * FROM opac_views where opac_view_visible=1", $dbh);
     if (pmb_mysql_num_rows($myQuery)) {
         while ($r = pmb_mysql_fetch_object($myQuery)) {
             $this->opac_views_list[] = $r->opac_view_id;
         }
     }
     $this->opac_views_list = array_unique($this->opac_views_list);
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:opac_view_inra.class.php

示例6: check_write_permission

 function check_write_permission()
 {
     global $webdav_current_user_id;
     if ($this->config['write_permission']) {
         $tab = array();
         $query = "";
         switch ($this->config['authentication']) {
             case "gestion":
                 $tab = $this->config['restrcited_user_write_permission'];
                 $query = "select grp_num from users where userid = " . $webdav_current_user_id;
                 break;
             case "opac":
                 $query = "select empr_categ from empr where id_empr = " . $webdav_current_user_id;
             case "anonymous":
             default:
                 $tab = $this->config['restrcited_empr_write_permission'];
                 break;
         }
         //pas de restriction, on est bon
         if (!count($tab)) {
             return true;
         } elseif ($query != "") {
             //on doit s'assurer que la personne connectée est dispose des droits...
             $result = pmb_mysql_query($query);
             if (pmb_mysql_num_rows($result)) {
                 if (in_array(pmb_mysql_result($result, 0, 0), $tab)) {
                     return true;
                 }
             }
         }
     }
     //si on est encore dans la fonction, c'est qu'on correspond à aucun critère !
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:34,代码来源:File.php

示例7: need_to_display

 function need_to_display($categ_id)
 {
     if ($categ_id) {
         //on va cherché le libellé...
         $categ = new \category($categ_id);
         if (substr($categ->libelle, 0, 1) == "~") {
             return false;
         }
         if ($this->config['only_with_notices']) {
             if ($this->restricted_notices != "") {
                 $clause = " and notice_id in (" . $this->restricted_notices . ")";
             } else {
                 $clause = "";
             }
             //notices ou notices de bulletins...
             $query = "select sum(nb) from (select count(1) as nb from notices_categories join noeuds on id_noeud = notices_categories.num_noeud join notices on notice_id = notcateg_notice join explnum on explnum_notice = notice_id and explnum_notice != 0 where explnum_mimetype != 'URL' and path like (select concat(path,'%') from noeuds where id_noeud = " . $categ_id . ")" . $clause . " union select count(1) as nb from notices_categories join noeuds on id_noeud = notices_categories.num_noeud join notices on notice_id = notcateg_notice and niveau_biblio = 'b ' join bulletins on num_notice = notice_id join explnum on explnum_bulletin = bulletin_id and explnum_notice=0 where explnum_mimetype != 'URL' and path like (select concat(path,'%') from noeuds where id_noeud = " . $categ_id . ")" . $clause . ") as uni ";
             $result = pmb_mysql_query($query);
             if (pmb_mysql_num_rows($result)) {
                 if (pmb_mysql_result($result, 0, 0) > 0) {
                     return true;
                 }
             }
         } else {
             return true;
         }
     }
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:28,代码来源:Categorie.php

示例8: get_datas

 public function get_datas()
 {
     //on commence par récupérer l'identifiant retourné par le sélecteur...
     $selector = $this->get_selected_selector();
     if ($selector) {
         $article_id = $selector->get_value();
         if ($article_id) {
             $sections = array();
             $query = "select num_section from cms_articles where id_article = " . $article_id;
             $result = pmb_mysql_query($query);
             if (pmb_mysql_num_rows($result)) {
                 $section_id = pmb_mysql_result($result, 0, 0);
                 if ($section_id) {
                     $datas = array();
                     $i = 0;
                     do {
                         $i++;
                         $query = "select id_section,section_num_parent from cms_sections where id_section = " . $section_id;
                         $result = pmb_mysql_query($query);
                         if (pmb_mysql_num_rows($result)) {
                             $row = pmb_mysql_fetch_object($result);
                             $section_id = $row->section_num_parent;
                             $datas[] = $row->id_section;
                         } else {
                             break;
                         }
                         //en théorie on sort toujours, mais comme c'est un pays formidable, on lock à 100 itérations...
                     } while ($row->section_num_parent != 0 || $i > 100);
                     return array_reverse($datas);
                 }
             }
         }
     }
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:35,代码来源:cms_module_breadcrumb_datasource_sections_from_article.class.php

示例9: calcNumero

 function calcNumero($id_entite, $type_acte)
 {
     global $dbh;
     global $acquisition_format;
     $p = array();
     $p = explode(",", $acquisition_format);
     $prefix = $p[$type_acte + 1];
     //recuperation du dernier numero pour le type d'acte concerné et l'entité en cours
     $q = "select max(substring(numero," . (strlen($prefix) + 1) . ")*1) from actes where type_acte = '" . $type_acte . "' ";
     $q .= "and num_entite = '" . $id_entite . "' ";
     $r = pmb_mysql_query($q, $dbh);
     $res = pmb_mysql_result($r, 0, 0);
     if (!$res) {
         $res = '0';
     }
     //creation du numéro avec prefixe et padding
     $res++;
     $numero = $prefix;
     if ($p[0] != 0) {
         $numero = str_pad($numero, $p[0] - strlen($res) + strlen($prefix), '0') . $res;
     } else {
         $numero = $numero . $res;
     }
     return $numero;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:func_achats.inc.php

示例10: proceed

 function proceed()
 {
     global $msg;
     //Actions possibles :
     //delete : suppression des jeux cochés
     //restore : restoration immédiate des jeux cochés
     //chaine vide : affichage
     switch ($this->act) {
         case "delete":
             if (!is_array($this->logid)) {
                 echo "<script>alert(\"" . $msg["sauv_list_unselected_set"] . "\"); history.go(-1);</script>";
             } else {
                 for ($i = 0; $i < count($this->logid); $i++) {
                     $requete = "select sauv_log_file from sauv_log where sauv_log_id=" . $this->logid[$i];
                     $resultat = pmb_mysql_query($requete) or die(pmb_mysql_error());
                     $file_to_del = pmb_mysql_result($resultat, 0, 0);
                     @unlink("admin/backup/backups/" . $file_to_del);
                     $requete = "delete from sauv_log where sauv_log_id=" . $this->logid[$i];
                     pmb_mysql_query($requete) or die(pmb_mysql_error());
                 }
             }
             break;
         default:
             //Do nothing
             break;
     }
     return $this->showForm();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:28,代码来源:sauvegarde_list.class.php

示例11: build_tree_sections

 protected function build_tree_sections($id_parent, $depth = 0)
 {
     global $dbh;
     if ($this->parameters['max_depth'] == 0 || $depth < $this->parameters['max_depth']) {
         $items = $ids = $rows = array();
         $query = "select id_section,section_title from cms_sections where section_num_parent = " . $id_parent . " order by section_order asc";
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             while ($row = pmb_mysql_fetch_object($result)) {
                 $ids[] = $row->id_section;
                 $rows[] = $row;
             }
             $ids = $this->filter_datas("sections", $ids);
             foreach ($rows as $row) {
                 if (in_array($row->id_section, $ids)) {
                     $section = cms_provider::get_instance("section", $row->id_section);
                     $item = array('id' => $row->id_section, 'title' => $row->section_title, 'link' => $this->get_constructed_link("section", $row->id_section), 'details' => $section->format_datas(false, false));
                     $sub_query = "select count(id_section) from cms_sections where section_num_parent = " . $row->id_section;
                     $sub_result = pmb_mysql_query($sub_query, $dbh);
                     if (pmb_mysql_num_rows($result) && pmb_mysql_result($sub_result, 0, 0) > 0) {
                         $item['children'] = $this->build_tree_sections($row->id_section, $depth + 1);
                     }
                     $items[] = $item;
                 }
             }
         }
     }
     return $items;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:cms_module_menu_datasource_menu_editorial.class.php

示例12: connection_mysql

 function connection_mysql($er_connec = 1, $my_bd = '', $bd = 1, $er_bd = 1)
 {
     global $opac_nb_documents;
     global $charset, $SQL_MOTOR_TYPE;
     global $charset, $SQL_MOTOR_TYPE, $time_zone, $time_zone_mysql;
     if (isset($time_zone) && trim($time_zone)) {
         date_default_timezone_set($time_zone);
     }
     //Pour l'heure PHP
     $my_connec = @pmb_mysql_connect(SQL_SERVER, USER_NAME, USER_PASS);
     if ($my_connec == 0 && $er_connec == 1) {
         die(my_error(0));
     }
     if ($bd) {
         $my_bd == '' ? $my_bd = DATA_BASE : $my_bd;
         if (pmb_mysql_select_db($my_bd, $my_connec) == 0 && $er_bd == 1) {
             die(my_error(0));
         }
     }
     $opac_nb_documents = @pmb_mysql_result(pmb_mysql_query("select count(*) from notices", $my_connec), 0, 0) * 1;
     if ($charset == 'utf-8') {
         pmb_mysql_query("set names utf8 ", $my_connec);
     } else {
         pmb_mysql_query("set names latin1 ", $my_connec);
     }
     if ($SQL_MOTOR_TYPE) {
         pmb_mysql_query("set storage_engine={$SQL_MOTOR_TYPE}", $my_connec);
     }
     if (isset($time_zone_mysql) && trim($time_zone_mysql)) {
         pmb_mysql_query("SET time_zone = {$time_zone_mysql}", $my_connec);
     }
     //Pour l'heure MySQL
     return $my_connec;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:34,代码来源:opac_mysql_connect.inc.php

示例13: cree_export_notices

function cree_export_notices($liste = array(), $typeexport = 'pmbxml2marciso', $expl = 1)
{
    global $base_path;
    global $keep_expl, $dbh;
    $keep_expl = $expl;
    // Récupération des notices
    $n_notices = count($liste);
    if ($n_notices == 0) {
        return "";
    } else {
        $_SESSION["param_export"]["notice_exporte"] = array();
        // Export !
        $z = 0;
        $e_notice = "";
        while ($z < count($liste)) {
            $id = $liste[$z];
            // Exclure de l'export (opac, panier) les fiches interdites de diffusion dans administration, Notices > Origines des notices NG72
            $sql = "select orinot_diffusion from origine_notice,notices where notice_id = '{$id}' and origine_catalogage = orinot_id";
            $res = pmb_mysql_query($sql, $dbh);
            $diffusable = pmb_mysql_result($res, 0, 0);
            if ($diffusable) {
                $export = new start_export($id, $typeexport);
                $e_notice .= $export->output_notice;
                $z++;
            } else {
                $z++;
            }
        }
    }
    return $e_notice;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:export_notices.inc.php

示例14: getLibelle

 function getLibelle()
 {
     global $dbh;
     $res = pmb_mysql_query("SELECT " . $_SESSION["classementGen_types"][$this->object_type]["TABLE_CLASSEMENT_FIELD"] . " \n\t\t\t\tFROM " . $_SESSION["classementGen_types"][$this->object_type]["TABLE"] . " \n\t\t\t\tWHERE " . $_SESSION["classementGen_types"][$this->object_type]["TABLE_ID"] . "=" . $this->object_id, $dbh);
     if (pmb_mysql_num_rows($res)) {
         $this->libelle = pmb_mysql_result($res, 0, 0);
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:8,代码来源:classementGen.class.php

示例15: formatdate_input

function formatdate_input($date_a_convertir)
{
    global $msg;
    global $dbh;
    $resultatdate = pmb_mysql_query("select date_format('" . $date_a_convertir . "', '" . $msg["format_date_input_model"] . "') as date_conv ");
    $date_conv = pmb_mysql_result($resultatdate, 0, 0);
    return $date_conv;
}
开发者ID:hogsim,项目名称:PMB,代码行数:8,代码来源:divers.inc.php


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