title: How can I pass in a parameter to use in an order by sql clause?
body: <p>Using PHP/MySQL, how can I place an order by SQL clause?</p>
  
  <p>This syntax isn't working:</p>
  
  <pre><code>$diplayquery = sprintf("
    SELECT *
    FROM  user_urls 
    WHERE user_id='%s' 
    ORDER BY total_count",
      mysql_real_escape_string($iduse) );
  
  $diplayqueryout = mysql_query($diplayquery);
  </code></pre>