'; /*** The SQL SELECT statement ***/ $sql = "SELECT * FROM emp1 ORDER BY fname"; echo "sql passed
"; /*** fetch into an PDOStatement object ***/ $stmt = $dbconn->query($sql); echo "PDOStatement object... created
"; while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { echo $row['fname'].' '.$row['lname'].' '.$row['address'].' '.$row['manager']; echo("
"); } /** close while ***/ /*** close the database connection ***/ $dbconn= null; } catch(PDOException $e) { echo $e->getMessage(); } ?>