2015-12-02 12:31:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by PhpStorm.
|
|
|
|
* User: seekdasky
|
|
|
|
* Date: 02/12/15
|
|
|
|
* Time: 12:36
|
|
|
|
*/
|
|
|
|
class RDVRepo
|
|
|
|
{
|
|
|
|
private $connexion;
|
|
|
|
|
|
|
|
public function __construct(){
|
|
|
|
$this->connexion = StaticRepo::getConnexion();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getById($id){
|
|
|
|
$req = $this->connexion->prepare('SELECT * FROM RDV WHERE Id = :id');
|
|
|
|
$req->execute(['id' => $id]);
|
|
|
|
return $req->fetchAll();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getByDate($date){
|
2015-12-03 10:50:53 +00:00
|
|
|
$date = date('o-m-d',$date);
|
|
|
|
$req = $this->connexion->prepare('SELECT * FROM RDV WHERE DATE(FROM_UNIXTIME(1449136444)) = :date');
|
|
|
|
$req->execute(['date' => $date]);
|
|
|
|
return StaticRepo::delNumeric($req->fetchAll());
|
2015-12-02 12:31:37 +00:00
|
|
|
}
|
|
|
|
|
2015-12-03 10:02:05 +00:00
|
|
|
public function delete($idRDV){
|
|
|
|
$req = $this->connexion->prepare('DELETE FROM RDV WHERE Id = :id');
|
|
|
|
return $req->execute(['id' => $idRDV]);
|
2015-12-02 12:31:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function add($timestamp,$duree,$idPatient,$idMedecin){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function updateDateTime($idRDV,$dateTime){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getByPatientAndDate($idPatient,$date){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-12-03 10:02:05 +00:00
|
|
|
}
|