PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $pdo->query("CREATE TABLE Picbruit (Id_B INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, heure_B TIME DEFAULT NULL)"); $pdo->query("INSERT INTO `Picbruit`(`heure_B`) VALUES ('08:53:47')"); $pdo->query("INSERT INTO `Picbruit`(`heure_B`) VALUES ('09:53:47')"); $pdo->query("INSERT INTO `Picbruit`(`heure_B`) VALUES ('10:53:47')"); $stm = $pdo->prepare("SELECT COUNT(*) FROM `Picbruit`"); $stm->execute([]); $count = $stm->fetchColumn(); echo "Count: $count"; echo '<br>'; $sql = $pdo->prepare("SELECT `heure_B` FROM `Picbruit`"); $sql->execute([]); $H0 = $sql->fetch(PDO::FETCH_BOTH); $row = $sql->fetch(PDO::FETCH_BOTH); $H = $sql->fetchcolumn(); $H1 = $sql->fetchcolumn(); echo gettype($H), "\n"; //$H = $row[0]; echo " h: $H", "\n"; echo " h: $H1", "\n"; echo "row $row", "\n";
Show:  
Copy Clear