Citation :
 
 <?php
   class Contenu
 {
  var $id;
  var $partie;
  var $i;
  
  function Contenu($id,$partie) {
  	if(empty($this->id)) {
    $sql = "SELECT * FROM vlcp_site WHERE partie='$this->partie' AND rubrique='' ORDER BY ordre DESC";
  	} else {
    $sql = "SELECT * FROM vlcp_site WHERE id='$this->id' ORDER BY ordre DESC";
  	}
    $req = mysql_query($sql) or die('Erreur SQL !' . $sql.'<br />' . mysql_error());
  }
    function getNbre() { $this->nbre = mysql_num_rows($req); return $this->nbre; }      function getId($i) { return mysql_result($req, $this->i, "id" ); }
  function getTitre($i) { $this->id = mysql_result($req, $this->i, "titre" ); return $this->titre; }
  function getTexte($i) { $this->id = mysql_result($req, $this->i, "texte" ); return $this->texte; }
  function getImage($i) { $this->id = mysql_result($req, $this->i, "image" ); return $this->image; }
  
 }   ?>
   |