Esempio n. 1
0
 private function existsACotationWithThisDate(Cotation $cotation)
 {
     $sql = "SELECT id \r\n            FROM cotations_history \r\n            WHERE data = :date AND codigo = :code";
     $query = $this->session->prepare($sql);
     $query->bindParam(":date", date("Y-m-d"));
     $query->bindParam(":code", $cotation->getCode());
     $query->execute();
     return $query->rowCount() > 0;
 }