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


PHP CBdd::execute方法代码示例

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


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

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

示例2: sql

	function sql($sqlfile){
		$ok = true;
		$file = file_get_contents($sqlfile); 
		// $file = ereg_replace("#;[^'a-zA-Z0-9\"]+#", ";///", $file);
		
		$arr_req = explode("///", $file);
		foreach($arr_req as $req) {
		  	if(trim($req)) {
				if(!ereg('DROP|ALTER|INSERT',$req)) $this->nb_elts ++;
		  		$out = CBdd::execute($req);
		  		$ok = $ok && $out;
			}
		}
		return $ok;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:15,代码来源:CInstall.php

示例3: reverse_etat_contact

	function reverse_etat_contact() {
		$sql = "UPDATE entreprise SET etatcontact_ent=abs(etatcontact_ent-1) WHERE id_ent = " . $this->table['id'];
		$res = CBdd::execute($sql);
		return $res;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:5,代码来源:CTableUtilisateur.php

示例4: down_rang

	function down_rang() {
		$nom_table=$this->table['tablename'];
		if ($this->table['tablename'] == 'cat') $id=$this->table['id_cat'];           
		else if ($this->table['tablename'] == 'commune') $id=$this->table['id_com'];   
		else if ($this->table['tablename'] == 'secteur') $id=$this->table['id_sec'];   
		else if ($this->table['tablename'] == 'commune') $id=$this->table['id_com'];  
		else if ($this->table['tablename'] == 'entreprise') $id=$this->table['id_ent'];
		else $id=$this->table['id'];
		$sql='select rang from '.$nom_table.' where id='.$id.'';
		$rang   = CBdd::select_one($sql, 'rang');
		$rang_plus=$rang+1;
		$sql2='UPDATE '.$nom_table.' SET rang = IF(rang='.$rang.','.$rang_plus.','.$rang.') WHERE rang IN ('.$rang.','.$rang_plus.')';
		$res = CBdd::execute($sql2);
		return $res;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:15,代码来源:CTable.php

示例5: downRang

    /**
     * Diminuer dans le rang
     *
     */
    public function downRang()
    {
        $toTables = $this->__getById() ;
        if ($toTables[$this->zRangColone] >= 1)
        {
            // --- l'enregistrement inferieur
            $zWhere  = ($this->zParentColone) ? $this->zParentColone . " = " . $toTables[$this->zParentColone] : "" ;
            $zWhere .= ($zWhere) ? " AND " : "" ;
            $zWhere .= $this->zRangColone . " > " . $toTables[$this->zRangColone] ;

            $zSql = "SELECT id, " . $this->zRangColone . " FROM " . $this->zTableName . " WHERE " . $zWhere . " ORDER BY " . $this->zRangColone . " ASC LIMIT 1" ;
            $toPermutRangs = CBdd::select_row($zSql) ;

            // --- permutation
            if (isset($toPermutRangs['id']))
            {
                $zSql = "UPDATE " . $this->zTableName . " SET " . $this->zRangColone . " = " . $toPermutRangs[$this->zRangColone] . " WHERE id = " . $this->iId . " ; " ;
                CBdd::execute($zSql) ;
                $zSql = "UPDATE " . $this->zTableName . " SET " . $this->zRangColone . " = " . $toTables[$this->zRangColone] . " WHERE id = " . $toPermutRangs['id'] . " ; " ;
                CBdd::execute($zSql) ;
            }
        }
        return true;
    }
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:28,代码来源:COperations.php

示例6: explode

	// Owen 01/2011 pour echaper au session de suppression
	$_SESSION['id']=x;
	//
	$nom = $_group['nom'];
	$id1= $_group['id'];
	$etat = $_group ['etat'];

	$sql1 = "SELECT text FROM groupe WHERE id = " . $id1;
	$text	= CBdd::select_one($sql1,'text');
	
	// Owen 01/2011 suppression contact �artir de vider groupe
	$text1=str_replace("|",",",$text);
	$tab = explode(",",$text1); 
	$text2=count($tab);
	for ($i=0; $i<$text2 and $text2!=0; $i++){
		if ($tab[$i]!='') CBdd::execute("DELETE FROM user WHERE id = " . $tab[$i]);
		else $not=1;
	}
	$tgroupe->update();
	if ($not!=1) $msginfo = "groupe bien vid&eacute;";
	$a = 0;
	break;
case 5555://confirmer
	if(!empty($_GET['id'])) $id = $_GET['id'];
	$a = 0;
	$_SESSION['confirme']='ok';
	$_SESSION['id']=$id;
	break;
case 6 : // Filtrer
	if(!empty($_GET['idcat'])) $idcat = $_GET['idcat'];
	$_SESSION['idcat'] = $idcat;
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:31,代码来源:groupe.php

示例7: array_unique

	$tgroupe->update();
	for ($i=0; $i<$text2 and $text2!=0; $i++){
		if ($tab[$i]!=''){
				$Zsql = "SELECT * FROM entreprise WHERE commune_alias=".$tab[$i];
				$commune = CBdd::select_one($Zsql,'commune_alias');
				//echo 'commune'.$commune;
				
				array_push($tab_user, $commune);
				
				$tab_user_old 	= CTableGroupeCommune::get_array_id_user($id);
				$tab_user_new 	= array_unique(array_merge($tab_user_old, $tab_user));
				if($tab_user_new) $liste_user_new = implode("|", $tab_user_new);
				$groupe = new CTableGroupeCommune(array('id'=>$id, 'text'=>$liste_user_new));
				$groupe->update();
		
				if(!$commune) CBdd::execute("DELETE FROM commune WHERE id_com = " . $tab[$i]);
					
		}
		else $not=1;
	}
	
	if ($not!=1) $msginfo = "groupe bien vid&eacute;";
	$a = 0;
	break;
case 5555://confirmer
	
	// RECUPERATION VARIABLE
	$id = $_GET['id'];
	$_SESSION['confirme']='ok';
	$_SESSION['id']= $id ;
	
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:30,代码来源:groupeCommune.php

示例8: down_rang

	function down_rang() {
		$sql = "
		call downrang('" . $this->table['tablename'] . "', " . $this->table['id'] . ")";
		$res = CBdd::execute($sql);
		return $res;
	}
开发者ID:rakotobe,项目名称:Rakotobe,代码行数:6,代码来源:CTable_.php


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