cytoffin 4 years ago
parent 7bf441bad4
commit 20b3bdba08

@ -4,6 +4,7 @@ class MyDB extends SQLite3
function __construct() function __construct()
{ {
$this->open('mysqlitedb.db'); $this->open('mysqlitedb.db');
$this->exec('CREATE TABLE partie(Id STRING,un STRING,deux STRING, trois STRING,quatre STRING,cinq STRING,six STRING,sept STRING,huit STRING,neuf STRING)');
} }
} }
@ -27,3 +28,15 @@ function CreerPatie(string $bd,string $id){
function SupprimerLigne(string $bd,string $id){ function SupprimerLigne(string $bd,string $id){
$suppression = $bd->query('DELETE FROM partie where Id="'.$id.'" '); $suppression = $bd->query('DELETE FROM partie where Id="'.$id.'" ');
} }
function Sup1h($datetime)
{
$dateactuelles = date('h:i');
$dateactuelle= new DateTime($dateactuelles);
$interval = $datetime->diff($dateactuelle);
echo $interval->format('%H');//00 years
if($interval>1){
echo "supp";
}
}
$datetime1 = new DateTime('12:55');
Sup1h($datetime1);
Loading…
Cancel
Save