title: how to remove quotes of any string when preparing queries
body: <pre><code>$desc = 'DESC';
  
  $getRecords = $conn-&gt;prepare('SELECT * FROM `courses` ORDER BY `id` :sort LIMIT :limitInc, :limit ');
  
  $getRecords-&gt;bindValue(':limit',$limit,PDO::PARAM_INT);  // working
  
  $getRecords-&gt;bindValue(':limitInc',$limitInc,PDO::PARAM_INT); // working
  
  // *** The line below isn't working ***
  $getRecords-&gt;bindValue(':sort', $desc ,PDO::PARAM_STR); // not working
  
  $getRecords-&gt;execute();
  </code></pre>
  
  <p>I am trying to call <code>$desc</code> in my prepare query..</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'PDOException' with message
    'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
    error in your SQL syntax; check the manual that corresponds to your
    MySQL server version for the right syntax to use near ''DESC' LIMIT 0,
    5' at line 1' in C:\xampp\htdocs\portfolio\nasiraan\try\indexx.php:89
    Stack trace: #0 C:\xampp\htdocs\portfolio\nasiraan\try\indexx.php(89):
    PDOStatement->execute() #1 {main} thrown in
    C:\xampp\htdocs\portfolio\nasiraan\try\indexx.php on line 89</p>
  </blockquote>
  
  <p>i am sure the solution is.. to remove quotes from the string <code>$desc</code>... but how ??  </p>