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


PHP pmb_mysql_query函数代码示例

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


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

示例1: 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

示例2: 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

示例3: get_datas

 public function get_datas()
 {
     $selector = $this->get_selected_selector();
     if ($selector) {
         $query = "select distinct id_article,if(article_start_date != '0000-00-00 00:00:00',article_start_date,article_creation_date) as publication_date from cms_articles join cms_articles_descriptors on id_article=num_article where num_article != '" . $selector->get_value() . "' and num_noeud in (select num_noeud from cms_articles_descriptors where num_article = '" . $selector->get_value() . "')";
         if ($this->parameters["sort_by"] != "") {
             $query .= " order by " . $this->parameters["sort_by"];
             if ($this->parameters["sort_order"] != "") {
                 $query .= " " . $this->parameters["sort_order"];
             }
         }
         $result = pmb_mysql_query($query);
         $return = array();
         if (pmb_mysql_num_rows($result) > 0) {
             while ($row = pmb_mysql_fetch_object($result)) {
                 $return[] = $row->id_article;
             }
         }
         $return = $this->filter_datas("articles", $return);
         if ($this->parameters["nb_max_elements"] > 0) {
             $return = array_slice($return, 0, $this->parameters["nb_max_elements"]);
         }
         return $return;
     }
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:cms_module_common_datasource_articles_by_article_categories.class.php

示例4: get_datas

 public function get_datas()
 {
     $selector = $this->get_selected_selector();
     if ($selector) {
         $tab_values = $selector->get_value();
         if (!is_array($tab_values)) {
             $tab_values = array($tab_values);
         }
         if (count($tab_values) > 0) {
             $list_values = implode(",", $tab_values);
             $query = "select id_article,if(article_start_date != '0000-00-00 00:00:00',article_start_date,article_creation_date) as publication_date  from cms_articles where num_section in (" . $list_values . ")";
             if ($this->parameters["sort_by"] != "") {
                 $query .= " order by " . $this->parameters["sort_by"];
                 if ($this->parameters["sort_order"] != "") {
                     $query .= " " . $this->parameters["sort_order"];
                 }
             }
             $result = pmb_mysql_query($query);
             $return = array();
             if ($result) {
                 while ($row = pmb_mysql_fetch_object($result)) {
                     $return[] = $row->id_article;
                 }
             }
             $return = $this->filter_datas("articles", $return);
             if ($this->parameters["nb_max_elements"] > 0) {
                 $return = array_slice($return, 0, $this->parameters["nb_max_elements"]);
             }
             return $return;
         }
     }
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:33,代码来源:cms_module_common_datasource_articles_sections.class.php

示例5: get_datas

 public function get_datas()
 {
     global $dbh;
     $selector = $this->get_selected_selector();
     if ($selector) {
         $query = "select distinct notice_id \n\t\t\t\tfrom notices join notices_categories on notice_id=notcateg_notice \n\t\t\t\tjoin cms_articles_descriptors on cms_articles_descriptors.num_noeud=notices_categories.num_noeud \n\t\t\t\tand num_article=" . $selector->get_value();
         $result = pmb_mysql_query($query, $dbh);
         $return = array();
         if ($result && pmb_mysql_num_rows($result) > 0) {
             $return["title"] = "Liste de notices";
             while ($row = pmb_mysql_fetch_object($result)) {
                 $return["records"][] = $row->notice_id;
             }
         }
         $return['records'] = $this->filter_datas("notices", $return['records']);
         $return['records'] = array_slice($return['records'], 0, $this->parameters['nb_max_elements']);
         if (!count($return['records'])) {
             return false;
         }
         // on tri par pertinence
         $query = "SELECT notice_id\n\t\t\tFROM notices\n\t\t\tJOIN notices_categories ON notice_id = notcateg_notice\n\t\t\tJOIN cms_articles_descriptors ON cms_articles_descriptors.num_noeud = notices_categories.num_noeud\n\t\t\tAND num_article =" . $selector->get_value() . " where notice_id in(" . implode(',', $return['records']) . ")group by notice_id order by count(*) desc, create_date desc";
         $result = pmb_mysql_query($query, $dbh);
         $return = array();
         if ($result && pmb_mysql_num_rows($result) > 0) {
             $return["title"] = "Liste de notices";
             while ($row = pmb_mysql_fetch_object($result)) {
                 $return["records"][] = $row->notice_id;
             }
         }
         return $return;
     }
     return false;
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:33,代码来源:cms_module_common_datasource_records_categories.class.php

示例6: update_notice_infos

 function update_notice_infos($notice_id)
 {
     if ($notice_id * 1 > 0) {
         $query = "update notices set indexint = " . $this->indexint->indexint_id . " where notice_id = " . $notice_id;
         pmb_mysql_query($query);
     }
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:7,代码来源:Indexint.php

示例7: search_other_function_filters

function search_other_function_filters()
{
    global $code_langue_restrict;
    global $charset, $msg, $marc_liste_langues;
    if (!$marc_liste_langues) {
        $marc_liste_langues = new marc_list('lang');
    }
    $r = "<select name='code_langue_restrict'>";
    $r .= "<option value=''>" . $msg[all_languages] . "</option>";
    $requete = "select distinct code_langue from notices_langues where code_langue is not null and code_langue!='' order by ordre_langue";
    $resultat = pmb_mysql_query($requete);
    // on met les balises <option> dans un tableau, indexé par le nom traduit de la langue
    $t = array();
    while ($res = pmb_mysql_fetch_object($resultat)) {
        if ($marc_liste_langues->table[$res->code_langue]) {
            $s = "<option value='" . htmlentities($res->code_langue, ENT_QUOTES, $charset) . "' ";
            if ($res->code_langue == $code_langue_restrict) {
                $s .= "selected";
            }
            $s .= ">" . $marc_liste_langues->table[$res->code_langue];
            $s .= "</option>";
            $t[$marc_liste_langues->table[$res->code_langue]] = $s;
        }
    }
    // tri le tableau selon les clés (ici les noms des langues, pas les codes)
    ksort($t);
    // recopie des balises triées dans la liste <select>
    foreach ($t as $k => $v) {
        $r .= $v;
    }
    $r .= "</select>";
    return $r;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:33,代码来源:simple_search_add_language.inc.php

示例8: 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

示例9: update_avis

function update_avis($id)
{
    global $dbh, $desc, $sujet, $msg, $charset;
    header('Content-Type: text/html;charset=' . $charset);
    $req = "update avis set sujet='" . $sujet . "', commentaire='" . $desc . "' where id_avis='" . $id . "'";
    pmb_mysql_query($req, $dbh);
    $requete = "select avis.note, avis.sujet, avis.commentaire, avis.id_avis, DATE_FORMAT(avis.dateAjout,'" . $msg[format_date] . "') as ladate, ";
    $requete .= "empr_login, empr_nom, empr_prenom, ";
    $requete .= "niveau_biblio, niveau_biblio, valide, notice_id ";
    $requete .= "from avis ";
    $requete .= "left join empr on empr.id_empr=avis.num_empr ";
    $requete .= "left join notices on notices.notice_id=avis.num_notice ";
    $requete .= "where id_avis='" . $id . "'";
    $requete .= "order by index_serie, tnvol, index_sew ,dateAjout desc ";
    $res = pmb_mysql_query($requete, $dbh);
    while ($loc = pmb_mysql_fetch_object($res)) {
        $display = "\n\t\t\t<div class='left'>\n\t\t\t\t<input type='checkbox' name='valid_id_avis[]' id='valid_id_avis[]' value='{$loc->id_avis}' onClick=\"stop_evenement(event);\" />";
        if (!$loc->valide) {
            $display .= "<font color='#CC0000'>" . $msg[gestion_avis_note] . " <span >" . htmlentities($loc->note, ENT_QUOTES, $charset) . " <b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        } else {
            $display .= "<font color='#00BB00'>" . $msg[gestion_avis_note] . " <span >" . htmlentities($loc->note, ENT_QUOTES, $charset) . " <b>" . htmlentities($loc->sujet, ENT_QUOTES, $charset) . "</b></span></font>";
        }
        if ($charset != "utf-8") {
            $loc->commentaire = cp1252Toiso88591($loc->commentaire);
        }
        $display .= ", " . htmlentities($loc->ladate, ENT_QUOTES, $charset) . " " . htmlentities($loc->empr_prenom . " " . $loc->empr_nom, ENT_QUOTES, $charset) . "\n\t\t\t</div>\n\t\t\t<div class='row'>" . do_bbcode($loc->commentaire) . "\t</div>\n\t\t";
    }
    print $display;
}
开发者ID:hogsim,项目名称:PMB,代码行数:29,代码来源:avis_ajax.inc.php

示例10: get_value

 public function get_value()
 {
     global $dbh;
     if ($this->parameters['sub_selector']) {
         $sub_selector = new $this->parameters['sub_selector']($this->get_sub_selector_id($this->parameters['sub_selector']));
         $values = $sub_selector->get_value();
         if (!is_array($values)) {
             if ($values != "") {
                 $values = array($values);
             } else {
                 $values = array();
             }
         }
         if (count($values)) {
             $tagslist = array();
             switch ($this->parameters['sub_selector']) {
                 case "cms_module_item_selector_item_generic":
                     $query = "select id_tag from docwatch_tags left join docwatch_items_tags on num_tag=id_tag where num_item in (" . implode(",", $values) . ")";
                     $result = pmb_mysql_query($query, $dbh);
                     if ($result) {
                         while ($row = pmb_mysql_fetch_object($result)) {
                             $tagslist[] = $row->id_tag;
                         }
                     }
                     return $tagslist;
                     break;
                 case "cms_module_common_selector_env_var":
                     return $values;
                     break;
             }
         }
     }
     return array();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:34,代码来源:cms_module_itemslist_selector_itemstags.class.php

示例11: show_orinot

function show_orinot($dbh)
{
    global $msg;
    global $charset;
    print "<table>\n\t<tr>\n\t\t<th>{$msg['orinot_nom']}</th>\n\t\t<th>{$msg['orinot_pays']}</th>\n\t\t<th>{$msg['orinot_diffusable']}</th>\n\t</tr>";
    // affichage du tableau des statuts
    $requete = "SELECT orinot_id, orinot_nom, orinot_pays, orinot_diffusion FROM origine_notice ORDER BY orinot_nom ";
    $res = pmb_mysql_query($requete, $dbh);
    $nbr = pmb_mysql_num_rows($res);
    $parity = 1;
    for ($i = 0; $i < $nbr; $i++) {
        $row = pmb_mysql_fetch_object($res);
        if ($parity % 2) {
            $pair_impair = "even";
        } else {
            $pair_impair = "odd";
        }
        $parity += 1;
        $tr_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='{$pair_impair}'\" onmousedown=\"document.location='./admin.php?categ=notices&sub=orinot&action=modif&id={$row->orinot_id}';\" ";
        print pmb_bidi("<tr class='{$pair_impair}' {$tr_javascript} style='cursor: pointer'><td>" . htmlentities($row->orinot_nom, ENT_QUOTES, $charset) . "</td><td>" . htmlentities($row->orinot_pays, ENT_QUOTES, $charset) . "</td>");
        if ($row->orinot_diffusion) {
            print "<td>{$msg['orinot_diffusable_oui']}</td>";
        } else {
            print "<td>{$msg['orinot_diffusable_non']}</td>";
        }
        print "</tr>";
    }
    print "</table>\n\t\t<input class='bouton' type='button' value=' {$msg['orinot_ajout']} ' onClick=\"document.location='./admin.php?categ=notices&sub=orinot&action=add'\" />";
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:29,代码来源:origine_notice.inc.php

示例12: 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

示例13: 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

示例14: genere_page_rss

function genere_page_rss($id = 0)
{
    global $dbh, $opac_url_base, $charset, $msg;
    global $opac_view_filter_class;
    if ($id) {
        $clause = " where id_rss_flux='{$id}' ";
    }
    $rqt = "select id_rss_flux, nom_rss_flux, img_url_rss_flux from rss_flux {$clause} order by 2 ";
    $res = pmb_mysql_query($rqt, $dbh);
    while ($obj = pmb_mysql_fetch_object($res)) {
        if ($opac_view_filter_class) {
            if (!$opac_view_filter_class->is_selected("flux_rss", $obj->id_rss_flux)) {
                continue;
            }
        }
        $liens .= "\n\t\t<tr>\n\t\t\t<td width=10%>";
        if ($obj->img_url_rss_flux) {
            $liens .= "<a href=\"index.php?lvl=rss_see&id=" . $obj->id_rss_flux . "\"><img src='" . $obj->img_url_rss_flux . "' border=none /></a>";
        }
        $liens .= "</td><td width=50%><a href=\"index.php?lvl=rss_see&id=" . $obj->id_rss_flux . "\">" . htmlentities($obj->nom_rss_flux, ENT_QUOTES, $charset) . "</a>\n\t\t\t</td><td><a href=\"" . $opac_url_base . "rss.php?id=" . $obj->id_rss_flux . "\" alt=\"" . $msg[abonne_rss_dispo] . "\" title=\"" . $msg[abonne_rss_dispo] . "\"><img id=\"rss_logo\" src='" . $opac_url_base . "images/rss.png' border=none /></a>\n\t\t\t" . htmlentities($opac_url_base . "rss.php?id=" . $obj->id_rss_flux, ENT_QUOTES, $charset) . "\n\t\t\t\t</td></tr>";
    }
    if ($liens) {
        $liens = "<table> {$liens} </table>";
    }
    return $liens;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:26,代码来源:includes_rss.inc.php

示例15: 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


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