예제 #1
0
 public function update(Projet $projet)
 {
     $query = $this->_db->prepare('UPDATE t_projet SET nom=:nom, titre=:titre, adresse=:adresse, superficie=:superficie, description=:description, 
     budget=:budget, updatedBy=:updatedBy, updated=:updated WHERE id=:id') or die(print_r($this->_db->errorInfo()));
     $query->bindValue(':id', $projet->id());
     $query->bindValue(':nom', $projet->nom());
     $query->bindValue(':titre', $projet->titre());
     $query->bindValue(':adresse', $projet->adresse());
     $query->bindValue(':description', $projet->description());
     $query->bindValue(':superficie', $projet->superficie());
     $query->bindValue(':budget', $projet->budget());
     $query->bindValue(':updated', $projet->updated());
     $query->bindValue(':updatedBy', $projet->updatedBy());
     $query->execute();
     $query->closeCursor();
 }
예제 #2
0
    public function update(Projet $projet)
    {
        $query = $this->_db->prepare('UPDATE t_projet SET 
		name=:name, description=:description, adresse=:adresse, 
		dateCreation=:dateCreation, avancementConstruction=:avancementConstruction,
		avancementFinition=:avancementFinition, updated=:updated, updatedBy=:updatedBy
		WHERE id=:id') or die(print_r($this->_db->errorInfo()));
        $query->bindValue(':id', $projet->id());
        $query->bindValue(':name', $projet->name());
        $query->bindValue(':description', $projet->description());
        $query->bindValue(':adresse', $projet->adresse());
        $query->bindValue(':dateCreation', $projet->dateCreation());
        $query->bindValue(':avancementConstruction', $projet->avancementConstruction());
        $query->bindValue(':avancementFinition', $projet->avancementFinition());
        $query->bindValue(':updated', $projet->updated());
        $query->bindValue(':updatedBy', $projet->updatedBy());
        $query->execute();
        $query->closeCursor();
    }
예제 #3
0
    public function update(Projet $projet)
    {
        $query = $this->_db->prepare(' UPDATE t_projet SET 
		nom=:nom,numeroTitre=:numeroTitre,emplacement=:emplacement,
		superficie=:superficie, description=:description,dateCreation=:dateCreation,
		createdBy=:createdBy,created=:created, idSociete=:idSociete
		WHERE id=:id') or die(print_r($this->_db->errorInfo()));
        $query->bindValue(':id', $projet->id());
        $query->bindValue(':nom', $projet->nom());
        $query->bindValue(':numeroTitre', $projet->numeroTitre());
        $query->bindValue(':emplacement', $projet->emplacement());
        $query->bindValue(':superficie', $projet->superficie());
        $query->bindValue(':description', $projet->description());
        $query->bindValue(':dateCreation', $projet->dateCreation());
        $query->bindValue(':createdBy', $projet->createdBy());
        $query->bindValue(':created', $projet->created());
        $query->bindValue(':idSociete', $projet->idSociete());
        $query->execute();
        $query->closeCursor();
    }
예제 #4
0
 $mieuxNotes = "projet.php";
 $recherche = "rechercheProjet.php";
 $ajouter = "ajoutProjet.php";
 require 'includes/menu.php';
 require 'includes/menuServices.php';
 require 'includes/menuInfos.php';
 require 'includes/themesProjet.php';
 require 'includes/bbcodeTexte.php';
 require 'objets/ObjetProjet.php';
 echo '<section id="voirProjet"><h2>Les derniers projets dans cette ville</h2>';
 $request = $bdd->query('SELECT * FROM freeCitizenProjet WHERE ville = "' . $ville . '" ORDER BY votes LIMIT 0, 10');
 while ($donnees = $request->fetch(PDO::FETCH_ASSOC)) {
     //appel au constructeur
     $projet = new Projet($donnees);
     //affichage du contenu de la bdd
     echo $projet->id();
     echo "</br>";
     echo $projet->titre();
     echo "</br>";
     echo $projet->date();
     echo "</br>";
     echo $projet->ville();
     echo "</br>";
     echo $projet->theme();
     echo "</br>";
     echo $projet->idAuteur();
     echo "</br>";
     echo $projet->equipe();
     echo "</br>";
     echo $projet->votes();
     echo "</br>";