title: Object of class PDOStatement could not be converted to string
body: <p>So in my effort to learn PHP I'm trying to make a basic pastebin script.</p>
  
  <p>At the moment I've created a config file and the index.php. I need to echo the text of a table column.</p>
  
  <p>I'm using the following.</p>
  
  <pre><code>$stmt = $connection-&gt;prepare("SELECT * FROM paste_docs WHERE option_name = 'content'");
  echo $stmt;
  </code></pre>
  
  <p>But of course that is throwing me an error.</p>
  
  <p>The paste_docs table has two columns.
  ID &amp; Content</p>
  
  <p>Side question: how would I get the last valid row ID and add +1 so when a paste submission is made it does not conflict?</p>