title: PHP Query failing, show error?
body: <p>I have a query on my page that uses a GET variable to pull data from my table...</p>
  
  <p>If I echo my GET var the data is there so im doing something wrong with my query, instead of or die can I show an error in the browser? </p>
  
  <pre><code>// Get USER ID of person
  $userID = $_GET['userID'];
  
  // Get persons
  $sql = 'SELECT * FROM persons WHERE id = $userID';
  $q   = $conn-&gt;query($sql) or die('failed!');
  </code></pre>