title: Mysqli Prepare Statements + Binding Order BY
body: <p>I am having a small issue with the mysqli_stmt prepare function. Here is my query:</p>
  
  <pre><code>$params = array(
      "sisi",
      "some_string",
      5000,
      "date_added DESC"
  );
  
  $sql = "SELECT *
          FROM scenes
          WHERE scene_title LIKE ?
          AND scene_id &gt; ?
          ORDER BY ?
          LIMIT ?";
  </code></pre>
  
  <p>Now when i bind the params to the array like this (i have a valid mysqli_stmt object instantiated):</p>
  
  <pre><code>call_user_func_array(array($this-&gt;mysql_stmt, 'bind_param'), $params);
  </code></pre>
  
  <p>The order by is not binded. I read on php.net (<a href="http://ca3.php.net/manual/en/mysqli.prepare.php" rel="nofollow">http://ca3.php.net/manual/en/mysqli.prepare.php</a>)</p>
  
  <blockquote>
    <p>The markers are legal only in certain
    places in SQL statements. For example,
    they are allowed in the VALUES() list
    of an INSERT statement (to specify
    column values for a row), or in a
    comparison with a column in a WHERE
    clause to specify a comparison value.</p>
    
    <p>However, they are not allowed for
    identifiers (such as table or column
    names), in the select list that names
    the columns to be returned by a SELECT
    statement, or to specify both operands
    of a binary operator such as the =
    equal sign.</p>
  </blockquote>
  
  <p>Is there a way around this or am i going to have to use mysql_real_escape_char() for the ORDER BY clause?</p>