示例#1
0
    public function add(Caisse $caisse)
    {
        $query = $this->_db->prepare(' INSERT INTO t_caisse (
		nom,dateCreation,created,createdBy)
		VALUES (:nom,:dateCreation,:created,:createdBy)') or die(print_r($this->_db->errorInfo()));
        $query->bindValue(':nom', $caisse->nom());
        $query->bindValue(':dateCreation', $caisse->dateCreation());
        $query->bindValue(':created', $caisse->created());
        $query->bindValue(':createdBy', $caisse->createdBy());
        $query->execute();
        $query->closeCursor();
    }
    public function add(Caisse $caisse)
    {
        $query = $this->_db->prepare(' INSERT INTO t_caisse (
		type, dateOperation, montant, designation, destination, created, createdBy)
		VALUES (:type, :dateOperation, :montant, :designation, :destination, :created, :createdBy)') or die(print_r($this->_db->errorInfo()));
        $query->bindValue(':type', $caisse->type());
        $query->bindValue(':dateOperation', $caisse->dateOperation());
        $query->bindValue(':montant', $caisse->montant());
        $query->bindValue(':designation', $caisse->designation());
        $query->bindValue(':destination', $caisse->destination());
        $query->bindValue(':created', $caisse->created());
        $query->bindValue(':createdBy', $caisse->createdBy());
        $query->execute();
        $query->closeCursor();
    }