16 lines
350 B
PHP
16 lines
350 B
PHP
<?php
|
|
|
|
function get_Station() {
|
|
try {
|
|
$dbh = new PDO('mysql:host=mysql;dbname=ksp', 'grisu', 'secret');
|
|
foreach($dbh->query('SELECT * from Station') as $row) {
|
|
print_r($row);
|
|
}
|
|
$dbh = null;
|
|
} catch(PDOException $e) {
|
|
print "Error!: " . $e->getMessage() . "<br/>";
|
|
die();
|
|
}
|
|
}
|
|
|
|
?>
|