<?php
$servername = "localhost";
$username = "kolejni";
$password = "admin";
$dbname = "brno";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT id, userID, tagID, permission, added  FROM cards";
$result = $conn->query($sql);

if ($result->num_rows > 0) {

    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "time: ". $row["added"].  " id: " . $row["id"]. " user: ".  $row["userID"]. " akcia: " . $row["tagID"]. " permission:" .  $row["permission"].  "<br>";
    }
} else {
    echo "0 results";
}
$conn->close();
?>

