Example #1
0
 public function votar(Codigo $cod, JuradoPopular $jpop)
 {
     $stmt = $this->db->prepare("INSERT INTO vota_pop values(?,?)");
     $stmt->execute(array($jpop->getId(), $cod->getId()));
     $stmt2 = $this->db->prepare("UPDATE pincho set num_votos=(num_votos + 1) where FK_establecimiento_pinc=?");
     $stmt2->execute(array($cod->getEstablecimiento()));
 }