Exemple #1
0
 function ajouter($idoperation, $idcompte, $idcategorie, $date_ecriture, $nom_frs, $montant, $description, $numero, $idmode_regl, $date_regl, $obs_regl, $idevenement, $numero_operation = null)
 {
     $requete = 'INSERT INTO ';
     $requete .= 'compta (';
     $requete .= 'idoperation,idcategorie,date_ecriture,nom_frs,montant,description,';
     $requete .= 'numero,idmode_regl,date_regl,obs_regl,idevenement, numero_operation,idcompte) ';
     $requete .= 'VALUES (';
     $requete .= $this->_bdd->echapper($idoperation) . ',';
     $requete .= $this->_bdd->echapper($idcategorie) . ',';
     $requete .= $this->_bdd->echapper($date_ecriture) . ',';
     $requete .= $this->_bdd->echapper($nom_frs) . ',';
     $requete .= $this->_bdd->echapper($montant) . ',';
     $requete .= $this->_bdd->echapper($description) . ',';
     $requete .= $this->_bdd->echapper($numero) . ',';
     $requete .= $this->_bdd->echapper($idmode_regl) . ',';
     $requete .= $this->_bdd->echapper($date_regl) . ',';
     $requete .= $this->_bdd->echapper($obs_regl) . ',';
     $requete .= $this->_bdd->echapper($idevenement) . ',';
     $requete .= $this->_bdd->echapper($numero_operation) . ',';
     $requete .= $this->_bdd->echapper($idcompte) . ' ';
     $requete .= ');';
     $resultat = $this->_bdd->executer($requete);
     if ($resultat) {
         $this->lastId = $this->_bdd->obtenirDernierId();
     }
     return $resultat;
 }