title: Use PDO in PIP MVC
body: <p>i am not new to PHP but definitely beginner in MVC stuff. I have read about MVC and get understanding that Model handles all DB operations ie. CRUD</p>
  
  <p>I googled bit nd found <code>Model.php</code> as</p>
  
  <pre><code>class Model {
  
  private $connection;
  
   public function __construct()
   {
      global $config;
  
      $this-&gt;connection = mysql_connect($config['db_host'], $config['db_username'], 
                          $config['db_password']) or die('MySQL Error: '. mysql_error());
      mysql_select_db($config['db_name'], $this-&gt;connection);
   }
  
   public function execute($qry)
   {
      $exec = mysql_query($qry) or die('MySQL Error: '. mysql_error());
      return $exec;
   }
  
  }
  </code></pre>
  
  <p>Now, i want to replace <code>__construct()</code> with PDO and also change function <code>execute($qry)</code> with PDO.</p>
  
  <p>As of now i have included <code>PDO.php</code> class with DB connection as <code>require_once</code> in <code>index.php</code> but in this way i feel that Model is not getting used at all.</p>
  
  <p>I am using <code>PIP</code> framework for PHP to use MVC.
  Please let me know how can i use PDO here. Link to PIP framework is <a href="http://gilbitron.github.io/PIP/" rel="nofollow">HERE</a></p>