title: PHP / MySQL - prepared statements debugging
body: <p>I have the following code:</p>
  
  <pre><code>$sql = "SELECT...";
  $stmt = $db-&gt;prepare($sql);
  $stmt-&gt;bind_param("&lt;types&gt;", $params...);
  $stmt-&gt;execute();
  $resultSet = $stmt-&gt;get_result();
  </code></pre>
  
  <p>My question is how exactly I can see the query that is being <strong>actually</strong> executed?</p>
  
  <p>If I execute this query directly (without the bindings) via MySQL client, it works great. But in this piece of code something goes wrong and I am trying to understand what.</p>
  
  <p>Types and params in $stmt->bind_param() seem to be correct but it returns an empty result set.</p>
  
  <p>Somebody?</p>