Hallo,
ich habe folgenden PHP Code
try {
$dbh = new PDO('mysql:host=localhost;dbname=usrdb_xxx_xxx', _DBUSER, _DBPASS);
$blub = $dbh->query('SELECT1 * from t_menue');
foreach ($blub as $row) {
print_r($row);
}
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
}
wenn ich Exception richtig verstanden habe, sollte doch der catch Block ausgeführt werden, tut er bei mir jedoch nicht
Warning: Invalid argument supplied for foreach() in /home/xxx/www.xxx.de/index.php on line 13
wo ist mein Verständnisfehler?
mfg
Twilo
--
Farbtabelle
Farbtabelle