本文整理汇总了PHP中pmb_mysql_fetch_assoc函数的典型用法代码示例。如果您正苦于以下问题:PHP pmb_mysql_fetch_assoc函数的具体用法?PHP pmb_mysql_fetch_assoc怎么用?PHP pmb_mysql_fetch_assoc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pmb_mysql_fetch_assoc函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetch_data
function fetch_data()
{
global $dbh, $lang, $include_path;
if (file_exists($include_path . "/section_param/{$lang}.xml")) {
_parser_($include_path . "/section_param/{$lang}.xml", array("SECTION" => "_section_"), "PMBSECTIONS");
$this->allow_section = 1;
}
$this->subst_param = array();
$myQuery = pmb_mysql_query("SELECT * FROM param_subst where subst_type_param= '" . $this->type . "' and subst_module_param= '" . $this->module . "' and subst_module_num= '" . $this->module_num . "' ", $dbh);
if (pmb_mysql_num_rows($myQuery)) {
while ($r = pmb_mysql_fetch_assoc($myQuery)) {
$this->subst_param[] = $r;
}
}
$this->no_subst_param = array();
$myQuery = pmb_mysql_query("SELECT * FROM parametres where type_param= '" . $this->type . "' and gestion=0 order by section_param,sstype_param", $dbh);
while ($r = pmb_mysql_fetch_assoc($myQuery)) {
$found = 0;
foreach ($this->subst_param as $key => $subst_param) {
if ($subst_param['subst_sstype_param'] == $r['sstype_param']) {
$this->subst_param[$key]['valeur_param_origine'] = $r['valeur_param'];
$this->subst_param[$key]['section_param'] = $r['section_param'];
$found = 1;
break;
}
}
if (!$found) {
$this->no_subst_param[] = $r;
}
}
}
示例2: __construct
function __construct($notice_ids, $filter_by_view = 1)
{
if (is_array($notice_ids)) {
$notice_ids = implode(',', $notice_ids);
}
$this->notice_ids = $notice_ids;
if ($this->notice_ids != '') {
//filtrage sur statut ou droits d'accès..
$query = $this->_get_filter_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'];
}
}
//filtrage par vue...
if ($filter_by_view) {
$this->_filter_by_view();
}
}
}
示例3: __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'];
}
}
}
}
}
示例4: 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();
}
}
示例5: indexGlobal
function indexGlobal()
{
global $msg, $dbh, $charset, $PMBusername;
if (SESSrights & ADMINISTRATION_AUTH) {
$result .= "<h3>" . htmlentities($msg["nettoyage_reindex_global"], ENT_QUOTES, $charset) . "</h3>";
pmb_mysql_query("set wait_timeout=3600");
//remise a zero de la table au début
pmb_mysql_query("delete from notices_global_index", $dbh);
pmb_mysql_query("delete from notices_mots_global_index", $dbh);
$query = pmb_mysql_query("select notice_id from notices order by notice_id");
if (pmb_mysql_num_rows($query)) {
while ($mesNotices = pmb_mysql_fetch_assoc($query)) {
// Mise à jour de la table "notices_global_index"
notice::majNoticesGlobalIndex($mesNotices['notice_id']);
// Mise à jour de la table "notices_mots_global_index"
notice::majNoticesMotsGlobalIndex($mesNotices['notice_id']);
}
pmb_mysql_free_result($query);
}
$not = pmb_mysql_query("SELECT count(1) FROM notices_global_index", $dbh);
$count = pmb_mysql_result($not, 0, 0);
$result .= $count . " " . htmlentities($msg["nettoyage_res_reindex_global"], ENT_QUOTES, $charset);
} else {
$result .= sprintf($msg["planificateur_rights_bad_user_rights"], $PMBusername);
}
return $result;
}
示例6: get_authors_informations
public function get_authors_informations()
{
$return = array();
$query = "select count(author_id) as nb from authors";
$result = pmb_mysql_query($query);
if (pmb_mysql_num_rows($result)) {
$return = pmb_mysql_fetch_assoc($result);
}
return $return;
}
示例7: list_agnostic_repositories
function list_agnostic_repositories($source_id, $notice)
{
$result = array();
$sql = 'SELECT source_id, comment, name FROM connectors_sources WHERE id_connector = \'agnostic\'';
$res = pmb_mysql_query($sql);
while ($row = pmb_mysql_fetch_assoc($res)) {
$result[] = array('id' => $row["source_id"], 'name' => utf8_normalize($row["name"]), 'comment' => utf8_normalize($row["comment"]));
}
return $result;
}
示例8: fetch_data
function fetch_data()
{
global $dbh;
$this->subst_param = array();
$myQuery = pmb_mysql_query("SELECT * FROM param_subst where subst_type_param= '" . $this->type . "' and subst_module_param= '" . $this->module . "' and subst_module_num= '" . $this->module_num . "' ", $dbh);
if (pmb_mysql_num_rows($myQuery)) {
while ($r = pmb_mysql_fetch_assoc($myQuery)) {
$this->subst_param[] = $r;
}
}
}
示例9: listProcs
function listProcs()
{
global $dbh;
if (SESSrights & ADMINISTRATION_AUTH) {
$result = array();
$rqt = 'select idproc, name, requete, comment from procs';
$res = pmb_mysql_query($rqt, $dbh);
while ($row = pmb_mysql_fetch_assoc($res)) {
$result[] = array('idproc' => $row->idproc, 'name' => $row->name, 'requete' => $row->requete, 'comment' => $row->comment);
}
return $result;
} else {
return array();
}
}
示例10: listEntrepotSources
function listEntrepotSources()
{
global $dbh;
if (SESSrights & ADMINISTRATION_AUTH) {
$result = array();
$requete = "select source_id, id_connector, comment, name from connectors_sources where repository=1";
$res = pmb_mysql_query($requete) or die(pmb_mysql_error());
while ($row = pmb_mysql_fetch_assoc($res)) {
$result[] = array("source_id" => $row["source_id"], "id_connector" => utf8_normalize($row["id_connector"]), "comment" => utf8_normalize($row["comment"]), "name_connector_in" => utf8_normalize($row["name"]));
}
return $result;
} else {
return array();
}
}
示例11: render
function render($context, $stream)
{
global $dbh;
$query_stream = new StreamWriter();
$this->pmb_query->render($context, $query_stream);
$query = $query_stream->close();
$result = pmb_mysql_query($query, $dbh);
if (pmb_mysql_num_rows($result)) {
$struct = array();
while ($row = pmb_mysql_fetch_assoc($result)) {
$struct[] = $row;
}
$context->set($this->struct_name, $struct);
} else {
$context->set($this->struct_name, 0);
}
}
示例12: getStatopacView
function getStatopacView($id_view)
{
global $dbh;
if (SESSrights & ADMINISTRATION_AUTH) {
$result = array();
$query = "select * from statopac_vue_" . $id_view;
$res = pmb_mysql_query($query, $dbh);
if ($res) {
while ($row = pmb_mysql_fetch_assoc($res)) {
$result[] = $row;
}
}
return $result;
} else {
return array();
}
}
示例13: initParcoursTris
/**
* Pour initialiser un parcours des tris
* Retourne le nombre de tris
*/
function initParcoursTris($objSort)
{
//on initialise la position du parcours
$this->posParcours = 0;
$this->nbResult = 0;
$this->tabParcours = null;
switch ($this->typeData) {
case 'base':
$result = pmb_mysql_query("SELECT id_tri, nom_tri, tri_par FROM tris WHERE tri_reference='" . $this->sortName . "' ORDER BY nom_tri;");
//echo "SELECT id_tri, nom_tri, tri_par FROM tris WHERE tri_reference='" . $this->sortName . "' ORDER BY nom_tri<br />";
if ($result) {
//on charge les tris dans un tableau
while ($this->tabParcours[$this->nbResult] = pmb_mysql_fetch_assoc($result)) {
$this->nbResult++;
}
pmb_mysql_free_result($result);
//s'il n'y a pas de tris
if ($this->nbResult == 0) {
//on vide la session stockant le tri en cours
$_SESSION["tri"] = "";
}
return $this->nbResult;
} else {
$_SESSION["tri"] = "";
return 0;
}
break;
case 'session':
$this->nbResult = $_SESSION["nb_sort" . $this->sortName];
//s'il n'y a pas de tris
if ($this->nbResult == 0) {
//on vide la session stockant le tri en cours
$_SESSION["last_sort" . $this->sortName] = "";
} else {
//on charge les tris dans un tableau
for ($i = 0; $i < $this->nbResult; $i++) {
$this->tabParcours[$i]["id_tri"] = $i;
$this->tabParcours[$i]["nom_tri"] = $objSort->descriptionTri($_SESSION["sort" . $this->sortName . $i]);
$this->tabParcours[$i]["tri_par"] = $_SESSION["sort" . $this->sortName . $i];
}
}
return $this->nbResult;
break;
}
}
示例14: get_publisher_information
function get_publisher_information($publisher_id)
{
global $dbh;
global $msg;
$result = array();
$publisher_id += 0;
if (!$publisher_id) {
throw new Exception("Missing parameter: publisher_id");
}
$sql = "SELECT * FROM publishers WHERE ed_id = " . $publisher_id;
$res = pmb_mysql_query($sql);
if (!$res) {
throw new Exception("Not found: publisher_id = " . $publisher_id);
}
$row = pmb_mysql_fetch_assoc($res);
$result = array("publisher_id" => $row["ed_id"], "publisher_name" => utf8_normalize($row["ed_name"]), "publisher_address1" => utf8_normalize($row["ed_adr1"]), "publisher_address2" => utf8_normalize($row["ed_adr2"]), "publisher_zipcode" => utf8_normalize($row["ed_cp"]), "publisher_city" => utf8_normalize($row["ed_ville"]), "publisher_country" => utf8_normalize($row["ed_pays"]), "publisher_web" => utf8_normalize($row["ed_web"]), "publisher_comment" => utf8_normalize($row["ed_comment"]), "publisher_links" => $this->proxy_parent->pmbesAutLinks_getLinks(3, $publisher_id));
return $result;
}
示例15: get_author_information
function get_author_information($author_id)
{
global $dbh;
global $msg;
$result = array();
$author_id += 0;
if (!$author_id) {
throw new Exception("Missing parameter: author_id");
}
$sql = "SELECT * FROM authors WHERE author_id = " . $author_id;
$res = pmb_mysql_query($sql);
if (!$res) {
throw new Exception("Not found: author_id = " . $author_id);
}
$row = pmb_mysql_fetch_assoc($res);
$result = array("author_id" => $row["author_id"], "author_type" => $row["author_type"], "author_name" => utf8_normalize($row["author_name"]), "author_rejete" => utf8_normalize($row["author_rejete"]), "author_see" => $row["author_see"], "author_date" => utf8_normalize($row["author_date"]), "author_web" => utf8_normalize($row["author_web"]), "author_comment" => utf8_normalize($row["author_comment"]), "author_lieu" => utf8_normalize($row["author_lieu"]), "author_ville" => utf8_normalize($row["author_ville"]), "author_pays" => utf8_normalize($row["author_pays"]), "author_subdivision" => utf8_normalize($row["author_subdivision"]), "author_numero" => utf8_normalize($row["author_numero"]));
if (method_exists($this->proxy_parent, "pmbesAutLinks_getLinks")) {
$result['author_links'] = $this->proxy_parent->pmbesAutLinks_getLinks(1, $author_id);
} else {
$result['author_links'] = array();
}
return $result;
}