title: Can I include one pdo connection
body: <p>Im a just moving to using PDO for my development and I see in most tutorials that the connection is opend for each db query like in Jeffery Ways example below</p>
  
  <pre><code>$id = 5;
  try {
      $conn = new PDO('mysql:host=localhost;dbname=myDatabase', $username, $password);
      $conn-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);   
  
      $stmt = $conn-&gt;prepare('SELECT * FROM myTable WHERE id = :id');
      $stmt-&gt;execute(array('id' =&gt; $id));
  
      while($row = $stmt-&gt;fetch()) {
          print_r($row);
      }
  } catch(PDOException $e) {
      echo 'ERROR: ' . $e-&gt;getMessage();
  }
  </code></pre>
  
  <p>Can I still do a connection in an external file and include it at the top of my page like with previous procedural coding and then do my queries below in the page?</p>
  
  <pre><code>&lt;?php include 'includes/db.php';?&gt;
  </code></pre>