title: How to pass parameters to query?
body: <p>I'm trying to write a query for my application, but I'm having some troubles. I need to pass as a parameter one field of my database, like:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT name, phone, email 
  FROM company 
  WHERE $P{clause} = $P{key}
  ORDER BY $P{order}
  </code></pre>
  
  <p>Because WHERE clause and ORDER BY clause are dynamic for the user to select.</p>
  
  <p>Using <code>$P{}</code> it didn't work.</p>