title: WHERE CLAUSE & ORDER BY IN MYSQL PHP - Parse error: syntax error, unexpected '' ' (T_CONSTANT_ENCAPSED_STRING), expecting ')'
body: <p>Having scoured these boards I can't seem to find a response which gives me the solution to the error I'm seeing with the below statement - I believe I have the order of this correct but am likely missing something simple, I want to display only rows with an entry in 'postcode' and order the columns by the 'sort_order' parameter - see code below...</p>
  <pre><code>if ($result = mysqli_query($conn,'SELECT * FROM temptable
   where postcode&lt;&gt;''
   ORDER BY ' .  $column . ' ' . $sort_order)) {
  </code></pre>