PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $sql = "CREATE TABLE INDICATEUR_M ( id_IM INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, date_IM DATE DEFAULT NULL, Lden DECIMAL (5,1) DEFAULT NULL, Ljour_avion DECIMAL (5,1) DEFAULT NULL, Ljour_total DECIMAL (5,1) DEFAULT NULL, etat_valid INT DEFAULT NULL, id_SB INT DEFAULT NULL)"; $pdo->exec($sql); echo 'Table INDICATEUR_M créée !'; echo '<br>'; $NMonth = 7; $Lden = 45; $Ljoura = 30; $Ljourt = 50; $noStation = 1; $stm = $pdo->prepare("INSERT INTO `Indicateur_M` (`date_IM`, `Lden`,`Ljour_avion`,`Ljour_total`, `Id_SB`) VALUES (:nm, :ld, :lja, :ljt , :nos") ; $stm->execute(array(':nm'=>$NMonth, ':ld'=>$Lden, ':lja'=>$Ljoura, ':ljt'=>$Ljourt , ':nos'=>$noStation));
Show:  
Copy Clear