setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT * FROM users");
$stmt->execute();
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
$num_rows = $stmt->rowCount();
if ($num_rows >= 1) {
foreach($rows as $row){
echo '
| '.$row['name'].' |
'.$row['email'].' |
'.$row['mobile'].' |
'.$row['access'].' |
'.$row['time'].' |
Edit | Delete |
';
}
} else{
echo "Not Found any Data
";
}
} catch (PDOException $e) {
echo "Error: " . $e->getMessage() . "
";
}
?>