public function update(Mojo $mojo) { $query = $this->_db->prepare(' UPDATE t_mojo SET x=:x,y=:y WHERE id=:id)') or die(print_r($this->_db->errorInfo())); $query->bindValue(':id', $mojo->id()); $query->bindValue(':x', $mojo->x()); $query->bindValue(':y', $mojo->y()); $query->execute(); $query->closeCursor(); }