connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT id, Nimi, Lentopaikka, Datetime, Tyyppi, Kiinnostus, Puh FROM demo"; $result = $conn->query($sql);
if ($result->num_rows > 0) { echo ""; // output data of each row while($row = $result->fetch_assoc()) { echo ""; } echo "
IDName
".$row["id"]."".$row["Nimi"]." ".$row["Lentopaikka"]." ".$row["Datetime"]." ".$row["Tyyppi"]."
"; } else { echo "0 results"; } $conn->close(); ?>