projet-php/toBDD.php

21 lines
644 B
PHP
Raw Normal View History

2015-12-03 11:00:22 +00:00
<?php
/**
* Created by PhpStorm.
* User: seekdasky
* Date: 03/12/15
* Time: 11:52
*/
require_once('autoloader.php');
$jsonP = json_decode('Docs/PatientExemple.json',true);
$jsonM = json_decode('Docs/MedecinExemple.json',true);
$repo = new PatientRepo();
foreach($jsonM as $patient) {
$repo->add($patient['Civilite'], $patient['Prenom'], $patient['Nom']);
}
foreach($jsonP as $patient){
$repo->add($patient['Civilite'],$patient['Prenom'],$patient['Nom'],$patient['Adresse'],$patient['Ville'],$patient['CodePostal'],$patient['DateNaissance'],$patient['LieuNaissance'],$patient['NumSecuriteSociale'],$patient['MedecinTraitant'])
}