title: PDO Fetch, Execute, statements etc
body: <p>I've been reading books and many posts regarding proper and recommended methods to retrieve and insert data OOP way.</p>
  
  <p>I cant fully understand the "query, select, fetch, execute" commands, where and when to use them. Don't get me wrong, I've been trying to read them from other peoples examples and stuff but I need a simple example to help me understand the logic of them.</p>
  
  <p>If you have any short and on the point examples of these methods, used in a real situation please post it, I would very much appreciate it!!</p>
  
  <p>I coded something even tho all to me is a bit blur because I actually started with advanced stuff but I need an explanation for the above commands to help me understand and get started.</p>
  
  <pre><code>&lt;?php 
     class DB { 
  
        private    $_pdo, 
             $_query,  
             $_error = false,  
             $_results,  
             $_count = 0; 
  
        private function __construct() { 
                 try { 
                    $this-&gt;_pdo = new PDO('mysql:host=' . Config::get('mysql/host') . ';dbname=' . Config::get('mysql/db'), Config::get('mysql/username'), Config::get('mysql/password')); 
                      } catch(PDOException $e) { 
                    die($e-&gt;getMessage()); 
                         }             
       ?&gt; 
  </code></pre>