Exemplo n.º 1
0
	public function update(Todo $todo){
    	$query = $this->_db->prepare(' UPDATE t_todo SET 
		todo=:todo, status=:status, priority=:priority, updated=:updated, updatedBy=:updatedBy
		WHERE id=:id')
		or die (print_r($this->_db->errorInfo()));
		$query->bindValue(':id', $todo->id());
		$query->bindValue(':todo', $todo->todo());
        $query->bindValue(':priority', $todo->priority());
		$query->bindValue(':status', $todo->status());
		$query->bindValue(':updated', $todo->updated());
		$query->bindValue(':updatedBy', $todo->updatedBy());
		$query->execute();
		$query->closeCursor();
	}