I am having a problem with a database class that I have created.
When I try and display the data that is in the table, no data shows, but it still passes the database->select().

```
<?php

class database {

private $DBhost  = "localhost";
private $DBuser  = "username";
private $DBpass  = "password";
private $DBname  = "database";

private $PDO    = null;
private $stmt   = null;

function __construct() {
  $this->PDO = new PDO("mysql:host=" . $this->DBhost . ";dbname=" . $this->DBname . ";charset=utf8", $this->DBuser, $this->DBpass);
}

function __destruct() {
  $this->PDO = null;
}

function select($query, $param = array()) {
  try {
    $this->stmt = $this->PDO->prepare($query);
    if (count($param) != 0) {
      $this->stmt->execute($param);
    } else {
      $this->stmt->execute();
    }
  } catch(Exception $ex) {
    $this->error($ex);
    return false;
  }
}

function resultset() {
  return $this->stmt->fetchAll();
}

function error($ex) {
  die('Something broke :(');
}
}
?>

```

I am trying to use this to display data in a html table, as shown on this next page.

```
<?php
include 'code/db.php';
$DB = new database();
?>
<html>
<head>
  <title>List</title>
</head>
<body>
<table>
  <tr>
    <th>First Name</th>
    <th>Last Name</th>
    <th>Email</th>
    <th>Phone number</th>
    <th>Mobile number</th>
    <th>Address</th>
    <th>State</th>
    <th>Post Code</th>
    <th>Settings</th>
  </tr>
<?php
$DB->select('SELECT * FROM owners ORDER BY first_name, last_name');

while($line = $DB->resultset()) {
  echo "<tr>";
  echo "<td>" . $line['first_name'] . "</td>";
  echo "<td>" . $line['last_name'] . "</td>";
  echo "<td>" . $line['email'] . "</td>";
  echo "<td>" . $line['phone_number'] . "</td>";
  echo "<td>" . $line['mobile_number'] . "</td>";
  echo "<td>" . $line['address'] . "</td>";
  echo "<td>" . $line['state'] . "</td>";
  echo "<td>" . $line['post_code'] . "</td>";
  echo '<td><a href="item-list?id=' . $line['id'] . '">Details</a><a href="edit-owner?id=' . $line['id'] . '"</a></td>';
  echo "</tr>";
}

?>
</table>
</body>
</html>

```

If you could help me out with this that would be great.