$dbh = new PDO('mysql:host=localhost;dbname=course_db; charset = utf8', 'root', '');
$sql = 'SELECT * FROM orders, orderdetails WHERE customerNumber="141" AND requiredDate < 2003-07-19 ';
$request = $dbh->query($sql);
foreach ($request as $p) {
echo 'customerName: ' . $p['customerNumber'] . '</br>' . 'requiredDate: ' . $p['requiredDate'] . '</br>' . '<hr>';
}