title: trying to switch these staements from pdo to mysqli
body: <p>How can I change the following piece of code</p>
  
  <pre><code>try
  {
      $dbh = new PDO('mysql:host=XXXXXX;dbname=XXXXXX', 'XXXXXX', 'XXXXXX');
  }
  catch(PDOException $e)
  {
      print "Error!: " . $e-&gt;getMessage() . "&lt;br/&gt;";
      die();
  }
  </code></pre>
  
  <p>and this piece of code</p>
  
  <pre><code>try
  {
      $paginate = new pagination($page, 'SELECT * FROM demo_table ORDER BY id', $options);
  }
  catch(paginationException $e)
  {
      echo $e;
      exit();
  }
  </code></pre>
  
  <p>from pdo to mysqli so that they correspond with each other?</p>