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


PHP pmb_mysql_num_rows函数代码示例

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


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

示例1: __construct

 function __construct($notice_ids, $user = 0)
 {
     global $PMBuserid;
     $this->user = $user;
     if ($this->user = 0) {
         $this->user = $PMBuserid;
     }
     $this->notice_ids = $notice_ids;
     if ($this->notice_ids != '') {
         //filtrage sur statut ou droits d'accès..
         $query = $this->_get_filter_query();
         if ($query) {
             $res = pmb_mysql_query($query);
             $this->notice_ids = "";
             if (pmb_mysql_num_rows($res)) {
                 while ($row = pmb_mysql_fetch_assoc($res)) {
                     if ($this->notice_ids != "") {
                         $this->notice_ids .= ",";
                     }
                     $this->notice_ids .= $row['id_notice'];
                 }
             }
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:filter_results.class.php

示例2: fetch_data

 function fetch_data()
 {
     global $dbh;
     $req = "SELECT surloc_num, location_id,location_libelle, rel_date_parution,rel_libelle_numero, rel_comment_opac \n\t\tfrom perio_relance, abts_abts, docs_location\n\t\twhere  location_id=idlocation and rel_abt_num=abt_id and num_notice=" . $this->serial_id . " and rel_comment_opac!='' group by rel_abt_num,rel_date_parution,rel_libelle_numero order by rel_nb desc";
     $result = pmb_mysql_query($req);
     if (pmb_mysql_num_rows($result)) {
         $tr_class = "";
         while ($r = pmb_mysql_fetch_object($result)) {
             $surloc_libelle = "";
             if ($opac_sur_location_activate && $r->surloc_num) {
                 $req = "select surloc_libelle from sur_location where surloc_id = " . $r->surloc_num;
                 $res_surloc = pmb_mysql_query($req);
                 if (pmb_mysql_num_rows($res_surloc)) {
                     $surloc = pmb_mysql_fetch_object($res_surloc);
                     $surloc_libelle = $surloc->surloc_libelle . " / ";
                 }
             }
             $line = $bulletin_retard_line;
             $line = str_replace("!!location_libelle!!", $surloc_libelle . $r->location_libelle, $line);
             $line = str_replace("!!date_parution!!", $r->rel_date_parution, $line);
             $line = str_replace("!!libelle_numero!!", $r->rel_libelle_numero, $line);
             $line = str_replace("!!comment_opac!!", $r->rel_comment_opac, $line);
             if ($tr_class == 'even') {
                 $tr_class = "odd";
             } else {
                 $tr_class = 'even';
             }
             $line = str_replace("!!tr_class!!", $tr_class, $line);
             $lines .= $line;
         }
         $tpl = $bulletin_retard_form;
         $tpl = gen_plus("bulletin_retard", $msg["bulletin_retard_title"], str_replace("!!bulletin_retard_list!!", $lines, $tpl));
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:34,代码来源:abts_perio.class.php

示例3: fetch_datas

 public function fetch_datas()
 {
     global $dbh;
     $this->instruments = array();
     $this->instruments_data = array();
     $this->label = "";
     $this->num_nomenclature = 0;
     $this->order = 0;
     if ($this->id) {
         //le nom de l'atelier
         $query = "select * from nomenclature_workshops where id_workshop = " . $this->id . " order by workshop_order asc, workshop_label";
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             if ($row = pmb_mysql_fetch_object($result)) {
                 $this->label = $row->workshop_label;
                 $this->num_nomenclature = $row->workshop_num_nomenclature;
                 $this->order = $row->workshop_order;
                 //récupération des instruments
                 $query = "select workshop_instrument_num_instrument, workshop_instrument_number,workshop_instrument_order from nomenclature_workshops_instruments where workshop_instrument_num_workshop = " . $this->id . " order by workshop_instrument_order asc";
                 $result = pmb_mysql_query($query, $dbh);
                 if (pmb_mysql_num_rows($result)) {
                     while ($row = pmb_mysql_fetch_object($result)) {
                         $this->add_instrument(new nomenclature_instrument($row->workshop_instrument_num_instrument));
                         $this->instruments_data[$row->workshop_instrument_num_instrument]['effective'] = $row->workshop_instrument_number;
                         $this->instruments_data[$row->workshop_instrument_num_instrument]['order'] = $row->workshop_instrument_order;
                     }
                 }
             }
         }
     }
 }
开发者ID:hogsim,项目名称:PMB,代码行数:31,代码来源:nomenclature_workshop.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: get_primaldata

 function get_primaldata()
 {
     global $dbh;
     $requete = "SELECT * FROM sub_collections WHERE sub_coll_id='" . addslashes($this->id) . "' ";
     $result = pmb_mysql_query($requete, $dbh);
     if (pmb_mysql_num_rows($result)) {
         $obj = pmb_mysql_fetch_object($result);
         pmb_mysql_free_result($result);
         $this->get_primaldatafrom($obj);
     } else {
         // pas de sous-collection avec cette clé
         $this->id = 0;
         $this->name = '';
         $this->parent = '';
         $this->parent_libelle = '';
         $this->parent_isbd = '';
         $this->publisher = '';
         $this->publisher_libelle = '';
         $this->publisher_isbd = '';
         $this->display = '';
         $this->issn = '';
         $this->isbd_entry = '';
         $this->comment = '';
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:subcollection.class.php

示例6: get_datas

 public function get_datas()
 {
     global $dbh;
     $return = array();
     $selector = $this->get_selected_selector();
     if ($selector) {
         $value = $selector->get_value();
         if ($value != 0) {
             //on part du premier exemplaire...
             $query = "select expl_cote from exemplaires where expl_notice = " . $value . " order by expl_cote  limit 1 ";
             $result = pmb_mysql_query($query, $dbh);
             if (pmb_mysql_num_rows($result) > 0) {
                 $row = pmb_mysql_fetch_object($result);
                 $cote = $row->expl_cote;
                 $query = "\n\t\t\t\t\t(select distinct expl_notice,expl_cote from exemplaires where expl_notice!=0 and expl_bulletin = 0 and expl_cote >= '" . $cote . "' and expl_notice = " . $value . " order by expl_cote asc limit 5)\n\t\t\t\t\t\tunion \n\t\t\t\t\t(select distinct expl_notice,expl_cote from exemplaires where expl_notice!=0 and expl_bulletin = 0 and expl_cote < '" . $cote . "' and expl_notice = " . $value . " order by expl_cote desc limit 5)";
                 $result = pmb_mysql_query($query, $dbh);
                 if (pmb_mysql_num_rows($result) > 0) {
                     $return["title"] = "";
                     while ($row = pmb_mysql_fetch_object($result)) {
                         $return["records"][] = $row->expl_notice;
                     }
                 }
                 $return['records'] = $this->filter_datas("notices", $return['records']);
                 if ($this->parameters['nb_max_elements'] > 0) {
                     $return['records'] = array_slice($return['records'], 0, $this->parameters['nb_max_elements']);
                 }
             }
         }
         return $return;
     }
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:32,代码来源:cms_module_common_datasource_records_similar_cote.class.php

示例7: get_datas

 public function get_datas()
 {
     global $opac_url_base;
     global $opac_show_book_pics;
     global $opac_book_pics_url;
     $datas = parent::get_datas();
     $notices = $datas['records'];
     $query = "select notice_id,tit1,thumbnail_url,code from notices where notice_id in(" . implode(",", $notices) . ")";
     $result = pmb_mysql_query($query);
     $notices = array();
     if (pmb_mysql_num_rows($result)) {
         while ($row = pmb_mysql_fetch_object($result)) {
             if ($opac_show_book_pics == '1' && ($opac_book_pics_url || $row->thumbnail_url)) {
                 $code_chiffre = pmb_preg_replace('/-|\\.| /', '', $row->code);
                 $url_image = $opac_book_pics_url;
                 $url_image = $opac_url_base . "getimage.php?url_image=" . urlencode($url_image) . "&noticecode=!!noticecode!!&vigurl=" . urlencode($row->thumbnail_url);
                 if ($row->thumbnail_url) {
                     $url_vign = $row->thumbnail_url;
                 } else {
                     if ($code_chiffre) {
                         $url_vign = str_replace("!!noticecode!!", $code_chiffre, $url_image);
                     } else {
                         $url_vign = $opac_url_base . "images/vide.png";
                     }
                 }
             }
             $notices[] = array('title' => $row->tit1, 'link' => $opac_url_base . "?lvl=notice_display&id=" . $row->notice_id, 'vign' => $url_vign);
         }
     }
     return array('records' => $notices);
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:cms_module_carousel_datasource_notices.class.php

示例8: get_value

 public function get_value()
 {
     if (!$this->value) {
         $parent = new cms_module_common_selector_sections($this->get_sub_selector_id("cms_module_common_selector_sections"));
         $cp = new cms_module_common_selector_type_section_filter($this->get_sub_selector_id("cms_module_common_selector_type_section_filter"));
         $parents = $parent->get_value();
         $field = $cp->get_value();
         $var = new cms_module_common_selector_env_var($this->get_sub_selector_id("cms_module_common_selector_env_var"));
         $this->value = array();
         if (is_array($parents) && count($parents)) {
             $query = "select id_section from cms_sections where section_num_parent in (" . implode(",", $parents) . ")";
             $result = pmb_mysql_query($query);
             $fields = new cms_editorial_parametres_perso($field['type']);
             if (pmb_mysql_num_rows($result)) {
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $fields->get_values($row->id_section);
                     if (in_array($var->get_value(), $fields->values[$field['field']])) {
                         $this->value[] = $row->id_section;
                     }
                 }
             }
         }
     }
     return $this->value;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:cms_module_common_selector_sections_by_parent_and_cp.class.php

示例9: fetch_data

 function fetch_data()
 {
     global $dbh;
     $this->selected_list = array();
     $req = "SELECT * FROM opac_filters where opac_filter_view_num=" . $this->id_vue . " and  opac_filter_path='" . $this->path . "' ";
     $myQuery = pmb_mysql_query($req, $dbh);
     if (pmb_mysql_num_rows($myQuery)) {
         $r = pmb_mysql_fetch_object($myQuery);
         $param = unserialize($r->opac_filter_param);
         $this->selected_list = $param["selected"];
     }
     $myQuery = pmb_mysql_query("SELECT * FROM docs_location order by location_libelle ", $dbh);
     $this->liste_item = array();
     $link = "";
     $i = 0;
     if (pmb_mysql_num_rows($myQuery)) {
         while ($r = pmb_mysql_fetch_object($myQuery)) {
             $this->liste_item[$i] = new stdClass();
             $this->liste_item[$i]->id = $r->idlocation;
             $this->liste_item[$i]->name = $r->location_libelle;
             if (in_array($r->idlocation, $this->selected_list)) {
                 $this->liste_item[$i]->selected = 1;
             } else {
                 $this->liste_item[$i]->selected = 0;
             }
             $i++;
         }
     }
     return true;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:30,代码来源:nav_sections.class.php

示例10: show_form

 function show_form($param = '')
 {
     global $dbh, $charset;
     global $deflt_upload_repertoire;
     //On créer le sélecteur pour choisir le repertoire d'upload
     $query = "SELECT * FROM upload_repertoire";
     $result = pmb_mysql_query($query, $dbh);
     $select = "";
     if (pmb_mysql_num_rows($result)) {
         $select .= "<select name='upload_repertoire'>";
         $allready_selected = false;
         while ($upload_rep = pmb_mysql_fetch_object($result)) {
             if ($param['upload_repertoire'] == $upload_rep->repertoire_id && !$allready_selected) {
                 $select .= "\t<option selected='true' value='{$upload_rep->repertoire_id}'>{$upload_rep->repertoire_nom}</option>";
                 $allready_selected = true;
             } elseif ($deflt_upload_repertoire == $upload_rep->repertoire_id && !$allready_selected) {
                 $select .= "\t<option selected='true' value='{$upload_rep->repertoire_id}'>{$upload_rep->repertoire_nom}</option>";
                 $allready_selected = true;
             } else {
                 $select .= "\t<option value='{$upload_rep->repertoire_id}'>{$upload_rep->repertoire_nom}</option>";
             }
         }
         $select .= "</select>";
     } else {
         $select .= $this->msg['planificateur_scan_docnum_no_upload_repertoire'];
     }
     $form_task .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='upload_folder'>" . $this->msg["planificateur_scan_docnum_upload_repertoire"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t{$select}\t\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='upload_folder'>" . $this->msg["planificateur_scan_docnum_upload_folder"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<input type='text' id='upload_folder' name='upload_folder' value='" . htmlentities($param['upload_folder'], ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t</div>";
     return $form_task;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:scan_docnum.class.php

示例11: search_other_function_filters

function search_other_function_filters()
{
    global $recherche_loc;
    global $charset;
    global $msg, $dbh;
    // mettre par défaut la localisation du lecteur
    if (!isset($recherche_loc) && $_SESSION["empr_location"]) {
        $recherche_loc = $_SESSION["empr_location"];
    }
    $r .= "<select name='recherche_loc'>";
    $r .= "<option value='0'>" . htmlentities($msg["search_loc_all_site"], ENT_QUOTES, $charset) . "</option>";
    $requete = "select location_libelle,idlocation from docs_location where location_visible_opac=1";
    $result = pmb_mysql_query($requete, $dbh);
    if (pmb_mysql_num_rows($result)) {
        while ($loc = pmb_mysql_fetch_object($result)) {
            $selected = "";
            if ($recherche_loc == $loc->idlocation) {
                $selected = "selected";
            }
            $r .= "<option value='{$loc->idlocation}' {$selected}>{$loc->location_libelle}</option>";
        }
    }
    $r .= "</select>";
    return $r;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:search_localisation.inc.php

示例12: explnum_doc

 function explnum_doc($id_expl = 0)
 {
     global $dbh;
     $this->explnum_doc_id = $id_expl;
     if (!$this->explnum_doc_id) {
         $this->explnum_doc_nomfichier = '';
         $this->explnum_doc_contenu = '';
         $this->explnum_doc_mime = '';
         $this->explnum_doc_extfichier = '';
     } else {
         $req = "select * from explnum_doc where id_explnum_doc='" . $this->explnum_doc_id . "'";
         $res = pmb_mysql_query($req, $dbh);
         if (pmb_mysql_num_rows($res)) {
             $expl = pmb_mysql_fetch_object($res);
             $this->explnum_doc_nomfichier = $expl->explnum_doc_nomfichier;
             $this->explnum_doc_contenu = $expl->explnum_doc_data;
             $this->explnum_doc_mime = $expl->explnum_doc_mimetype;
             $this->explnum_doc_extfichier = $expl->explnum_doc_extfichier;
         } else {
             $this->explnum_doc_nomfichier = '';
             $this->explnum_doc_contenu = '';
             $this->explnum_doc_mime = '';
             $this->explnum_doc_extfichier = '';
         }
     }
 }
开发者ID:hogsim,项目名称:PMB,代码行数:26,代码来源:explnum_doc.class.php

示例13: fetch_datas

 protected function fetch_datas()
 {
     global $dbh;
     $this->name = "";
     $this->nature = 0;
     $this->order = 0;
     $this->types = array();
     if ($this->id) {
         $query = "select * from nomenclature_formations where id_formation = " . $this->id;
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             $row = pmb_mysql_fetch_object($result);
             $this->set_name($row->formation_name);
             $this->set_nature($row->formation_nature);
             $this->set_order($row->formation_order);
             //récupération des types
             $query = "select id_type from nomenclature_types where type_formation_num = " . $this->id . " order by type_order asc";
             $result = pmb_mysql_query($query, $dbh);
             if (pmb_mysql_num_rows($result)) {
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $this->add_type(new nomenclature_type($row->id_type));
                 }
             }
         }
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:nomenclature_formation.class.php

示例14: get_link_user

 function get_link_user()
 {
     global $dbh, $PMBuserid;
     $requete = "SELECT * FROM search_perso";
     if ($PMBuserid != 1) {
         $requete .= " WHERE (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') ";
     }
     $requete .= " order by search_name ";
     $myQuery = pmb_mysql_query($requete, $dbh);
     $this->search_perso_user = array();
     $link = "";
     if (pmb_mysql_num_rows($myQuery)) {
         $i = 0;
         while ($r = pmb_mysql_fetch_object($myQuery)) {
             if ($r->search_directlink) {
                 if ($r->search_shortname) {
                     $libelle = $r->search_shortname;
                 } else {
                     $libelle = $r->search_name;
                 }
                 $link .= "\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<a href=\"javascript:document.forms['search_form" . $r->search_id . "'].submit();\">{$libelle}</a>\n\t\t\t\t\t</span>\n\t\t\t\t";
             }
             $this->search_perso_user[$i] = new stdClass();
             $this->search_perso_user[$i]->id = $r->search_id;
             $this->search_perso_user[$i]->name = $r->search_name;
             $this->search_perso_user[$i]->shortname = $r->search_shortname;
             $this->search_perso_user[$i]->query = $r->search_query;
             $this->search_perso_user[$i]->human = $r->search_human;
             $this->search_perso_user[$i]->directlink = $r->search_directlink;
             $i++;
         }
     }
     $this->directlink_user = $link;
     return true;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:35,代码来源:search_perso.class.php

示例15: fetch_datas

 public function fetch_datas()
 {
     global $dbh;
     if ($this->id) {
         //le nom de la famille
         $query = "select family_name from nomenclature_families where id_family = " . $this->id;
         $result = pmb_mysql_query($query, $dbh);
         if (pmb_mysql_num_rows($result)) {
             while ($row = pmb_mysql_fetch_object($result)) {
                 $this->set_name($row->family_name);
             }
             //récupération des pupitres
             $query = "select id_musicstand from nomenclature_musicstands where musicstand_famille_num = " . $this->id . " order by musicstand_order asc";
             $result = pmb_mysql_query($query, $dbh);
             if (pmb_mysql_num_rows($result)) {
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $this->add_musicstand(new nomenclature_musicstand($row->id_musicstand));
                 }
             }
         }
     } else {
         $this->musicstands = array();
         $this->name = "";
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:25,代码来源:nomenclature_family.class.php


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