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


PHP CBdd::select方法代码示例

本文整理汇总了PHP中CBdd::select方法的典型用法代码示例。如果您正苦于以下问题:PHP CBdd::select方法的具体用法?PHP CBdd::select怎么用?PHP CBdd::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBdd的用法示例。


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

示例1: include

}

/*------------------------------------------------------
		A FAIRE DANS TOUS LES CAS
--------------------------------------------------------*/

if(!empty($_SESSION['idpays']) && (empty($_GET['ville']))){
	$filtre = " WHERE pays like '".$_SESSION['idpays']."' ";
}else $filtre = " WHERE pays like '%%' ";


$requetPays_   ="select * from departement ";
if ($_GET['order']) $requetPays_  .= "".$filtre." ORDER BY ".COrder::formate($_GET['order'])."";
else $requetPays_  .= "".$filtre." ORDER BY ".$order." DESC";

$requetPays = CBdd::select($requetPays_);
?>
<!-- InstanceEndEditable -->
<div id="mainwrap">
  <div id="header"><? include("../nav/header.php"); ?></div>
  <div id="top"><? include("../nav/menu_h.php"); ?></div>
  <div id="filet">
    <div id="zonetitre">
      <div id="signe"></div>
      <div id="titre"><!-- InstanceBeginEditable name="titre" -->Departement/Canton<!-- InstanceEndEditable --></div>
    </div>
  </div>
  <div id="contentarea">
    <div id="left"><? include("../nav/menu_g.php"); ?></div>
    <div id="center">
      <div id="page"><!-- InstanceBeginEditable name="page" --> <? echo CHtml::get_toolbar(array('add'=>2, 'cancel'=>1))?> <!-- InstanceEndEditable --></div>
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:departement.php

示例2: get_elements

function get_elements($id_parent = '') {
	$and =  'AND idgal = ' . $id_parent.'';
	$sql = "SELECT * FROM " . $this->table . " WHERE etat = 1 " . $and . " ORDER BY rang ASC";  
	$res = CBdd::select($sql);
	$this->nb_elements = mysql_num_rows($res);
	return $res;
}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:7,代码来源:CImage.php

示例3: create

	function create($sitemap_name = '') {
		
		if(!$sitemap_name) $sitemap_name = SS_ADMIN_TO_USERFILE . "/sitemap.xml";
		
		if(empty($sitemap_name)) $sitemap_name = "sitemap_" . $rep_name . ".xml";
		$changefreq 	= array('daily', 'weekly', 'monthly');
		$priority		= array('0.1', '0.5', '1.0');
		$tab_archive	= array();

		rsort($tab_archive);
		$xml = simplexml_load_file(SS_ADMIN_TO_USERFILE . '/google/sitemap_base.xml');
		
		//scan bdd
		$sql = "SELECT * FROM page WHERE etat = 1";
		$res = CBdd::select($sql);
		while($page = mysql_fetch_array($res)) {
			$url = $xml->addChild('url');
			$url->addChild('loc', CUrl::get_urlsite() . "/" . CFunction::formate_chaine(utf8_decode($page['nom']), '-') . "_p" . $page['id']. ".html");
			$url->addChild('lastmod', CDate::formate_date($page['date']));
			$url->addChild('changefreq', $changefreq[rand(0, 2)]);
			$url->addChild('priority', $priority[rand(0, 2)]);
		}

		$html = $xml->asXML();
		file_put_contents($sitemap_name, $html);
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:26,代码来源:CSitemap.php

示例4: GetRSS

	function GetRSS() 
	{ 
		$this->checkValues(); 
		
		$rssValue = "<?xml version=\"1.0\"?>\r\n"; 	
		$rssValue .= "<rss version=\"2.0\">\r\n"; 	
		
		$rssValue .= "<channel>\r\n"; 
		$rssValue .= "<title>" . $this->channelTitle . "</title>\r\n"; 
		$rssValue .= "<link>" . $this->channelLink . "</link>\r\n"; 
		$rssValue .= "<description>" . $this->channelDesc . "</description>\r\n"; 
		
		$rssValue .= "<image>\r\n"; 
		$rssValue .= "<title>" . $this->imageTitle . "</title>\r\n"; 
		$rssValue .= "<url>" . $this->imageURL . "</url>\r\n"; 
		$rssValue .= "<link>" . $this->imageLink . "</link>\r\n"; 
		$rssValue .= "</image>\r\n"; 		
		
		$sql = "SELECT * FROM page WHERE etat = 1 ORDER BY date DESC";
		$res = CBdd::select($sql);
		
		while($page = mysql_fetch_array($res)) 
		{ 
			$rssValue .= "<item>\r\n"; 
			$rssValue .= "<title>" . $page['nom'] . "</title>\r\n"; 
			$rssValue .= "<description>" . $page['description'] . "</description>\r\n"; 
			$rssValue .= "<link>" .htmlentities(CUrl::get_href('page', $page['id'], $page['nom'])). "</link>\r\n"; 
			$rssValue .= "</item>\r\n"; 
		} 
		
		$rssValue .= "</channel>\r\n";		
		$rssValue .= "</rss>\r\n"; 
		
		return $rssValue; 
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:35,代码来源:CFeed.php

示例5: get_elements

function get_elements($id_parent = '') {
	$and = ($this->table_parent && $id_parent) ? 'AND id' . substr($this->table_parent, 0, 3) . ' = ' . $id_parent : '';
	$sql = "SELECT * FROM " . $this->table . " WHERE etat = 1 " . $and . " ORDER BY rang";
	$res = CBdd::select($sql);
	$this->nb_elements = mysql_num_rows($res);
	return $res;
}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:7,代码来源:CMenu.php

示例6: get_imapkeys

	static function get_imapkeys() {
		$imapkeys = array();
		$sql = "SELECT imap FROM gr_email WHERE imap != ''";
		$res = CBdd::select($sql);
		while( $email = mysql_fetch_array($res) ) {
			array_push($imapkeys, $email['imap']);
		}
		return $imapkeys;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:9,代码来源:CTableGrEmail.php

示例7: get_keyword

	function get_keyword() {
		$sql 		= "(SELECT nom FROM artiste ORDER BY rand() LIMIT 5) UNION (SELECT nom FROM chanson ORDER BY rand() LIMIT 5)";
		$res 		= CBdd::select($sql);
		$keyword 	= "klip, gasy, clip, malagasy, chanson, chant, dago, malagasy, hira, vari�t�";
		while($word = mysql_fetch_array($res)) {
			$keyword .= "," . $word['nom'];
		}
		return $keyword;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:9,代码来源:CMeta.php

示例8: get_option

	static function get_option($selectedvalue, $tablename, $colvaluename="id", $colvuename="nom", $where=1) {
		   $option = "";
		   $sql = "SELECT " . $colvaluename . ", " . $colvuename . " FROM " . $tablename . " WHERE " . $where . " ORDER BY " . $colvuename;
		   $result = CBdd::select($sql);
		   while($array = mysql_fetch_array($result)) {
		   		$selected = CForm::get_selected($selectedvalue, $array[$colvaluename]);
		   		$option = $option . "<option value='" . $array[$colvaluename] . "'" . $selected . ">" . ucfirst(utf8_encode(substr($array[$colvuename], 0, 16))) . "</option>\n";
		   }
		   return $option;
	}	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:10,代码来源:CForm.php

示例9: select

	static function select($istart=0,$ioffset=1000,$igrp=0,$order = 'mlt_iListId') 
	{
			$tGrps = array();
			
			$zSql = " ";
			$zSql .= " SELECT DISTINCT mlt_iListId FROM moul_tables ";
			$zSql .= " INNER JOIN moul_listes ON (moul_listes.id=moul_tables.mlt_iListId)";
			
			if($igrp == 1000)  {
				$grp = CTableMoulGpFic::get_elms_of_grp(0);
				foreach($grp as $i=>$grps){
					if($grps['fic']!='') $tGrps[$i] = $grps['fic'];
				}
				if($grps['fic']!=''){
					$zSql .= " WHERE mlt_iListId NOT IN (";
					for($i=0;$i<count($tGrps)-1;$i++) $zSql .= $tGrps[$i].",";
					$zSql .= $tGrps[$i].") ";
				}
			}
			
			if($igrp == 1001){
				$grp = CTableMoulGpFic::get_elms_of_grp();
				foreach($grp as $i=>$grps){
					if($grps['fic']!='') $tGrps[$i] = $grps['fic'];
				}
				if($grps['fic']!=''){
					$zSql .= " WHERE mlt_iListId IN (";
					for($i=0;$i<count($tGrps)-1;$i++) $zSql .= $tGrps[$i].",";
					$zSql .= $tGrps[$i].") ";
				}
			}
			
			if(($igrp != 0) && ($igrp != 1000) && ($igrp != 1001))  {
				$grp = CTableMoulGpFic::get_elms_of_grp($igrp);
				foreach($grp as $i=>$grps){
					if($grps['fic']!='') $tGrps[$i] = $grps['fic'];
				}
				if($grps['fic']!=''){
					$zSql .= " WHERE mlt_iListId IN (";
					for($i=0;$i<count($tGrps)-1;$i++) $zSql .= $tGrps[$i].",";
					$zSql .= $tGrps[$i].") ";
				}
			}
			
			$zSql .= " ORDER BY " . COrder::formate($order) ;
			$zSql .= " LIMIT " . $istart ."," . $ioffset;

			$toRes = CBdd::select($zSql);
			$tFichiers = array();
			while($toItm = mysql_fetch_assoc($toRes)){
				array_push($tFichiers,$toItm);
			}
			
		return 	$tFichiers;	
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:55,代码来源:CTableMoulGp.php

示例10: select_not_null

	static function select_not_null() 
	{
		$zSql = " SELECT * FROM moul_groupes_tmp WHERE tmp_grp>0 AND tmp_fic>0 ";
		$res  = CBdd::select($zSql);
		$tarrs= array();
		while($otmp = mysql_fetch_assoc($res)){
			array_push($tarrs,$otmp);	
		}
		
		return $tarrs;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:11,代码来源:CTableMoulGrpTmp.php

示例11: rearrange

	function rearrange($idart)
	{
		// CBdd::update('CALL rearrange_galerie('.$idart.');');
            $iKey = 1 ;
            $oRes = CBdd::select('SELECT id FROM galerie WHERE idart = ' . $idart . ' ORDER BY rang') ;
            while ($tiItems = mysql_fetch_assoc($oRes))
            {
                CBdd::execute("UPDATE galerie SET rang = " . $iKey . " WHERE id=" . $tiItems['id']) ;
                $iKey++ ;
            }
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:11,代码来源:CTableGalerie.php

示例12: show_db_content

	function show_db_content($arr_type=array('table', 'function', 'procedure')) {
		$arr_content = array();
		foreach($arr_type as $type) {
			$sql = "SHOW " . $type . " STATUS";
			$res = CBdd::select($sql);
			while($content = mysql_fetch_array($res)) {
				if($type == 'table') $key = 0; else $key = 1;
				array_push($arr_content, $content[$key]);
			}
		}
		return $arr_content;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:12,代码来源:CInstall.php

示例13: get_elms_of_grp

	static function get_elms_of_grp($iGp='')
	{
		$zSql 	 = " ";
		$zSql 	.= " SELECT * FROM moul_gpficmail ";
		if($iGp) $zSql 	.= " WHERE grp = " . $iGp ;
		$ores  = CBdd::select($zSql);
		$tzres = array();
		while($toItm = mysql_fetch_assoc($ores)){
			array_push($tzres,$toItm);
		}
		return $tzres;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:12,代码来源:CTableMoulGpFic.php

示例14: select

	static function select($order='mtp_iListId') 
	{
			$zSql = " SELECT DISTINCT mtp_iListId FROM moul_tables_tmp ";
			$zSql .= " INNER JOIN moul_listes ON (moul_listes.id = moul_tables_tmp.mtp_iListId) ";
			$zSql .= " ORDER BY " . COrder::formate($order);

			$toRes = CBdd::select($zSql);
			$tFichiers = array();
			while($toItm = mysql_fetch_assoc($toRes)){
				array_push($tFichiers,$toItm);
			}
		return 	$tFichiers;	
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:13,代码来源:CTableMoultmp.php

示例15: get_elms

		static function get_elms($fic='')
		{
			$zSql = " SELECT * FROM moul_groupes ";
			if($fic != ''){
				if($fic!=0) $zSql .= " WHERE fichiers >0 ";
				if($fic==0) $zSql .= " WHERE fichiers =0 ";
			}
			$ores = CBdd::select($zSql);
			$tzres = array();
				while($toItm = mysql_fetch_assoc($ores)){
					array_push($tzres,$toItm);
				}
			return 	$tzres;
		}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:14,代码来源:CTableGrpMl.php


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