An error har occured.
', $e->getMessage(), '
'; } $sth = $dbh->query("SELECT * FROM Category"); $sbh->setFetchMode(PDO::FETCH_ASSOC); $result = $sth->fetchAll(); if (count($result) > 0) { foreach($result as $r) { echo $r['name'], "\t", $r['id'], "\n"; } }