";
// }
// else echo "DB Connection ok
";
try
{
$dbconn = new PDO($dsn,$user,$pw);
foreach ($dbconn->query('SELECT * from tbl_orte') as $row) {
print_r($row);
}
// close DB connection
$dbconn = null;
}
catch (PDOException $e) {
print "ODBC Error!: " . $e->getMessage() . "
";
die();
}
/**
$pdo = new PDO('pgsql:host=192.168.137.1;port=5432;dbname=anydb', 'anyuser', 'pw');
sleep(5);
$stmt = $pdo->prepare('SELECT * FROM sometable');
$stmt->execute();
$pdo = null;
sleep(60);
**/
?>