title: Query not returning anything. How can I input test to make sure that I know it's working?
body: <p>After being advised that the old method of access a database were not correct. I have now started using the PDO object. I am setting up a simple query but I am not getting any results back. Any help or advise would be appreciated. It is not even printing the query back to me. Would turning on error messages help?</p>
  
  <pre><code>&lt;?php
  
  //print_r(PDO::getAvailableDrivers()); 
  
  $config['db'] = array( //This is the config array with the database details
  'host'              =&gt; 'localhost',
  'username'          =&gt; 'root',
  'password'          =&gt; '',
  'dbname'            =&gt; 'website'
  ); 
  
  $db = new PDO('mysql:host=' . $config['db']['host'] . ';dbname' . $config['db']['dbname'],         $config['db']['username'], $config['db']['password']); //Instanciate an PDO Object
  $query = $db-&gt;query("SELECT 'articles'.'title' FROM 'articles'");//running a query from the database
  
  print_r($query); //printing a query
  
  
  //while ($row = $query-&gt;fetch(PDO::FETCH_ASSOC)){
  //      echo $row['title'], '&lt;br&gt;';
  //}
  </code></pre>