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


PHP CBdd::select_row方法代码示例

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


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

示例1: get_footer

	static function get_footer() {
		$footer = CBdd::select_row("select * from footer where etat = 1");
		if(!is_array($footer)) {
			$footer['text']	 		= self::get_text_default();
		}
		return $footer;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:7,代码来源:CTableFooter.php

示例2: __construct

function __construct($id_page = 0, $id_art = 0, $id_cat = 0) {
	
	if($id_page) {
		$sql = 'SELECT nom, text, description, keywords FROM page WHERE id = ' . $id_page;
		$meta= CBdd::select_row($sql);
		$this->title = $meta['nom'];
		$keywords_default = $meta['keywords'] ? $meta['keywords'] : self::formate_to_keywords($meta['text']);
		$description_default = substr(self::formate_to_description($meta['text']) . '. ' . ucwords(str_replace(',', '', $keywords_default)), 0, 254);
		$this->description = $meta['description'] ? $meta['description'] : $description_default;
		$this->keywords = $meta['keywords'] ? $meta['keywords'] : $keywords_default;
	}
	elseif($id_art) {
		$sql = 'SELECT nom, nom as description, nom as keywords FROM article WHERE id = ' . $id_art;
		$meta= CBdd::select_row($sql);
		$this->title = $meta['nom'];
		$this->description = $meta['description'] ? $meta['description'] : $meta['nom'];
		$this->keywords = $meta['keywords'] ? $meta['keywords'] : $meta['nom'];
	}
	elseif($id_cat)  {
		$sql = 'SELECT nom, nom as description, nom as keywords  FROM categorie WHERE id = ' . $id_cat;
		$meta= CBdd::select_row($sql);
		$this->title = $meta['nom'];
		$this->description = $meta['description'] ? $meta['description'] : $meta['nom'];
		$this->keywords = $meta['keywords'] ? $meta['keywords'] : $meta['nom'];
	}
}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:26,代码来源:CMeta.php

示例3: send

	static function send($destinataire) {
		$expediteur = CBdd::select_one("SELECT email FROM user WHERE type = 2", "email");
		$id_texte	= CConfiguration::get_valeur('WELCOME_TEXT_ID');
		
		$sql_texte_select = "SELECT * FROM texte WHERE id = " . $id_texte;
		$texte = CBdd::select_row($sql_texte_select);
		
		$sql_user = "SELECT * FROM user WHERE email = '" . $destinataire . "'";
		$user = CBdd::select_row($sql_user);
		
		$message = str_replace('$NOM', $user['nom'], $texte['text']);
		$message = str_replace('$PRENOM', $user['prenom'], $message);
		
		//echo $message;
		
		$sujet = $texte['nom'];
		
		$sql_unicite_message = "SELECT id FROM email WHERE destinataire = '" . addslashes($destinataire) . "' AND nom = '" . addslashes($sujet) . "'";
		// echo $sql_unicite_message;
		if(CBdd::select_one($sql_unicite_message, 'id')) {
			return 1;
		}
		
		$sql_email_insert = "INSERT INTO email(expediteur, destinataire, nom, text, etat) VALUES ('" . addslashes($expediteur) . "', '" . addslashes($destinataire) . "', '" . addslashes($sujet) . "', '" . addslashes($message) . "', '2')";
		
		
		CBdd::insert($sql_email_insert);
		
		return CMail::send_mail($destinataire, CFonction::force_stripslashes($sujet), CFonction::force_stripslashes($message), $expediteur, array(), 'Bcc: ' . $expediteur);
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:30,代码来源:CWelcome.php

示例4: get_design

	static function get_design() {
		$design = CBdd::select_row("select * from design where etat = 1");
		if(!is_array($design)) {
			$design['imgbando'] 	= "bando.jpg";
			$design['text']	 		= self::get_text_default();
			$design['couleur1'] 	= "#dd8753";
			$design['couleur2']		= "#133087";
		}
		return $design;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:10,代码来源:CTableDesign.php

示例5: get_href

	static function get_href($cible) {
		$href = "";
		if(CMail::is_email($cible)) {
			$tab_email = explode(",", $cible);
			foreach($tab_email as $email) {
				$sql = "SELECT id, nom, prenom FROM hbclients WHERE id = '" . $email . "' OR email = '" . $email . "'";
				$hbclients = CBdd::select_row($sql);
				$href .= '<span class="info"><a href="hb_clients.php?id=' . $hbclients['id'] . '&a=5">' .$email . '</a><div class="bulle">'. $hbclients['nom'] . '&nbsp;' . $hbclients['prenom'] . '</div></span>,';
			}
			$href = trim($href, ',');
		} else {
			$id = CBdd::select_one("SELECT id FROM hbgroupe WHERE id = '" . $cible . "' OR nom = '" . $cible . "'" , "id");
			$href = '<span class="info"><a href="hbgroupe.php?id=' . $id . '&a=5">' . $cible .'</a><div class="bulle">'. implode(', <br/>', self::get_array_nom_user($cible)) . '</span>';
		}
		return $href;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:16,代码来源:CTableHbGroupe.php

示例6: get_adress

	function get_adress($courriel) {
		$sql 	 = "SELECT civilite, nom, prenom, societe, adresse, cp, ville, pays FROM user WHERE email = '" . $courriel . "'";
		$user 	 = CBdd::select_row($sql);
		$adress  = CTableCivilite::get_text($user['civilite']);
		$adress	.= "<br />";
		$adress .= $user['prenom']. " " . $user['nom'];
		$adress	.= "<br />";
		
		if(trim($user['societe'])) {
		$adress .= $user['societe'];
		$adress	.= "<br />";
		}
		
		$adress .= $user['adresse'];
		$adress	.= "<br />";
		$adress .= $user['cp']. " " . $user['ville'];
		$adress	.= "<br />";
		$adress .= ucwords(CTablePays::get_name($user['pays']));
		return ucwords($adress);
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:20,代码来源:CPublipostage.php

示例7: get_href

	static function get_href($cible) {
		$href = "";
		if(CMail::is_email($cible)) {
			$tab_email = explode(",", $cible);
			foreach($tab_email as $email) {
				$sql = "SELECT id, nom, prenom FROM user WHERE id = '" . $email . "' OR email = '" . $email . "'";
				$user = CBdd::select_row($sql);
				$href .= '<span class="info"><a href="user.php?id=' . $user['id'] . '&a=5">' .$email . '</a><div class="bulle">'. $user['nom'] . '&nbsp;' . $user['prenom'] . '</div></span>,';
			}
			$href = trim($href, ',');
		} else {
			$id = CBdd::select_one("SELECT id FROM groupe WHERE id = '" . $cible . "' OR nom = '" . $cible . "'" , "id");
			$list_user = self::get_array_nom_user($id);
			if(count($list_user)> 3) {
				$list_user = array_slice($list_user, 0, 3);
				$list_user[] = '...';
			}
			$href = '<span class="info"><a href="groupe.php?id=' . $id . '&a=5">' . $cible .'</a><div class="bulle">'. implode(', <br/>', $list_user) . '</span>';
		}
		return $href;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:21,代码来源:CTableGroupe.php

示例8: get_element

	static function get_element($idquestion, $numero="") {
		//recuperer la structure de la question
		$sql = "SELECT * FROM question WHERE id = " . $idquestion;
		$question = CBdd::select_row($sql);
		$html = "";
		
		//construre label
		$html .= '<label id="label_q' . $idquestion . '"><span>' . $numero . '</span><span class="question">' . $question['nom'] . '</span></label>';
		
		$html .= '<div class="reponse">';
		
		//construire le html selon type
		switch($question['type']) {
			case 'select' : 
				$choix_array = self::to_array($question['choix']);
				$html .= parent::get_select($choix_array, "", "q" . $question['id']);
				break;
			case 'input' :
				$obligatoire = $question['obligatoire'] ? 'class="obligatoire"' : '';
				$html .= parent::get_input($question['choix'], "q" . $question['id'], $obligatoire);
				break;
			case 'textarea' :
				$obligatoire = $question['obligatoire'] ? 'class="obligatoire"' : '';
				$html .= parent::get_textarea($question['choix'], "q" . $question['id'], $obligatoire);
				break;
			case 'radio' :
				$choix_array = self::to_array($question['choix']);
				$html .= parent::get_radio($choix_array, "", "q" . $question['id'], "<br />");
				break;
			case 'checkbox' :
				$choix_array = self::to_array($question['choix']);
				$html .= parent::get_checkbox($choix_array, "", "q" . $question['id'], "<br />");
				break;
		}
		
		$html .= '</div>';
		
		//renvoyer le résultat pour l'affichage
		return $html;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:40,代码来源:CFormQuestion.php

示例9: while

      <th><a href="?order=societe">Soci&eacute;t&eacute;</a></th>
      <th><a href="?order=telephone">T&eacute;l&eacute;phone</a></th>
      <th><a href="?order=etat_contact">Etat</a></th>
      <th><a href="?order=date">Date d'ajout</a></th>
      <th>Prochain rdv</th>
      <th>Heure rdv</th>
      <th>Type rdv</th>
      <th>Modif</th>
      <th>Suppr</th>
      <th>Envoi</th>
      <th align="left"><input name="select" type="checkbox" id="select" onclick="reverse_check()" value=""/></th>
    </tr>
    <?php
		  $i = 0; 
		  while ($user = @mysql_fetch_array($r_user)) {
			  $rdv = CBdd::select_row("SELECT date, heure, type FROM rdv WHERE iduser = " . $user['id'] . " ORDER BY date LIMIT 1");
	      ?>
    <tr>      
      <td><a href="user.php?a=5&id=<?php echo $user['id'] ?>" target="_parent"><?php echo $user['id'] ?></a></td>
      <td class="zinfo">             
        <?php
              $__text = CFunction::cut_string($user['nom'], $max_input_text+3);
              echo $__text;
              if($user['nom'] != $__text) {
              ?>
               <div class="bulle">
               <?php echo $user['nom']; ?>
              </div>
              <?php 
              }
              ?>              
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:user_groupe.php

示例10: get_nb_element

function get_nb_element() {
	$sql = "SELECT COUNT(*) as nombre FROM " . $this->table . " WHERE etat = 1 ";
	$res = CBdd::select_row($sql);
	return $res['nombre'];
}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:5,代码来源:CGalerie.php

示例11: CTableFaq

	}	
	$tfaq = new CTableFaq(array('etat'=>$etat, 'question'=>CFunction::addslashes($question), 'reponse'=>CFunction::addslashes($reponse)));
	$tfaq->insert();
	$msginfo = 'FAQ bien ajout&eacute;e';
	
	/*
	 *  CREATION AUTOMATIQUE DE LA PAGE
	 */
	
	$page_faq = CTablePage::select('*', 'text LIKE \'%<!--FAQ-->%\'');
	
	if(!$page_faq || !mysql_num_rows($page_faq)) {

		// Get first article
		
		$art = CBdd::select_row('SELECT id FROM article WHERE 1 ORDER BY id LIMIT 0,1');
		
		$tpag = new CTablePage(
			array(
				'nom'=>'FAQ', 
				'etat'=>$etat, 
				'idart'=>$art['id'], 
				'text'=>'<!--FAQ-->', 
				'head'=>'', 
				'description'=>'', 
				'keywords'=>'', 
				'send'=>0)
			);
		$tpag->insert();
	}
	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:30,代码来源:faqs.php

示例12: date

 if ($radioText && $idopportunite)
 {
     
     $zSqlEnvoieMail  = " SELECT opportunite.*, hbpiecesjointes.piece AS piece, text FROM opportunite" ;
     $zSqlEnvoieMail .= " LEFT JOIN hbpiecesjointes ON hbpiecesjointes.id = pieId" ;
     $zSqlEnvoieMail .= " LEFT JOIN texte ON texte.id = texId" ;
     $zSqlEnvoieMail .= " WHERE opportunite.id = " . $idopportunite ;
     
     $toEnvoyes = CBdd::select_row($zSqlEnvoieMail) ;
     
     $expediteur = CTableUser::get_email_admin() ;
     $destinataire = $email ;
     $liste_email = CTableHbGroupe::get_liste_email($destinataire);
     
     // --- Creation du mail en HTML
     $texte = CBdd::select_row("SELECT nom, text, style FROM texte WHERE id = " . $toEnvoyes['texId']);
     
     $body = CNmail::build_html_body($texte['style'], $texte['text']);
     
     $zDate = date('Y-m-d H:i:s')  ;
           
     $obj = new CTableEmail(array(
     	'expediteur'=>CFunctions::addslashes($expediteur),
     	'destinataire'=>CFunctions::addslashes($destinataire),
     	'nom'=>CFunctions::addslashes($texte['nom']),
     	'id_text' => $toEnvoyes['texId'],	
     	'text'=>mysql_escape_string(CFunctions::addslashes($texte['text'])),
     	'pj'=>CFunctions::addslashes($toEnvoyes['piece']),
     	'date' => $zDate));
     $iEmailId = $obj->insert();
     
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:30,代码来源:user.php

示例13: get_element

function get_element($id) {
	$sql = "SELECT * FROM " . $this->table . " WHERE etat = 1 AND id = " . $id . " ORDER BY rang";
	$res = CBdd::select_row($sql);
	$this->nb_elements = 1;
	return $res;
}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:6,代码来源:CMenu.php

示例14: get_first_element

function get_first_element($id_menu) {
	$sql = "SELECT * FROM " . $this->table . " WHERE id" . substr($this->table_parent, 0, 3) . " = " . $id_menu . " AND etat = 1 ORDER BY rang  LIMIT 1";
	$res = CBdd::select_row($sql);
	return $res;
}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:5,代码来源:CSousmenu.php

示例15: CTableEmail

		<?php
		break;
	case 33:
		$des = new CTableEmail(array('id'=>$id));
		$des ->delete();
		echo 'Supprim&eacute; avec succ&egrave;s';
		break;
	case 4:		// AFFICHAGE
		$t_envoi = new CTableEmail(array('id'=>$id));
		$envoi = $t_envoi->select_row();
		
		if ( $envoi['type_envoi'] == 0 ){
			$groupe = CBdd::select_row("SELECT nom FROM groupe WHERE id = '".$envoi['id_groupe']."'");
		}
		elseif ( $envoi['type_envoi'] == 1 ){
			$groupe = CBdd::select_row("SELECT nom FROM gr_groupe WHERE id = '".$envoi['id_groupe']."'");	
		}
		
		$sql = "SELECT nom FROM texte WHERE id = ".$envoi['id_text'];
		$text = CBdd::select_one($sql, 'nom');	
		?>
		<fieldset>
          	<legend>Affichage de <?php echo $nom; ?></legend>
          	<p>
          		<label>Type Groupe</label>:          		
                	<?php if ( $envoi['type_envoi'] == 0 ){ echo "Groupe"; }elseif ( $envoi['type_envoi'] == 1 ){ echo "Groupe GR"; }  ?>              	
          	</p>
          	<p>
          		<label>Nom Groupe</label>:          		
                	<?php echo $groupe['nom'];  ?>              	
          	</p>
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:envoi-campagne.php


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