title: $wpdb, ezSQL class escape/filter or not?
body: <p>My question is about $wpdb methods in wordpress. Before running these methods for example:</p>
  
  <pre><code>$wpdb-&gt;query
  $wpdb-&gt;get_results
  $wpdb-&gt;get_var ...
  </code></pre>
  
  <p>do we need to escape/filter inputs? Is this required/preferred for every method or only some?</p>
  
  <p>Is this enough for example to deal with all illegal chars (example from wordpress codex) :</p>
  
  <pre><code>$wpdb-&gt;query( 
      $wpdb-&gt;prepare( "DELETE FROM $wpdb-&gt;postmeta WHERE post_id = '13' AND meta_key = 'gargle'" ,$id, $key )
  );
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p>As indicated in the answer bellow, indeed for every single user input you should check parameter values prior insertion to the database. Its not about only security, its about general logic of the web app (for example, parsing something on frontend, will not end up with proper result for end user if data you contain in the database is not something what you expect - even that data is not questionable from security standpoint).</p>
  
  <p>Having this said, the prepare method mentioned above for the wordpress - is the method which will guaranty and remove any security concerns from perspective of sql injection.</p>