title: Why does backticks fails in PDO query?
body: <p>I have a table with hyphens in the name, and I can't change the table name so I thought backticks would help.</p>
  
  <p>Unfortunally for me it failed, some googling did'nt give me any answers. How can I solve this?</p>
  
  <p>ex:</p>
  
  <pre><code>    $stmt = $this-&gt;_dbh-&gt;prepare(
          'UPDATE `:table`
          SET status = NOT status
          WHERE id=:id;');
  
  
      $stmt-&gt;bindParam(':table',$this-&gt;_settings['table'], PDO::PARAM_STR);
      $stmt-&gt;bindParam(':id',$data['id'], PDO::PARAM_INT);
      if( $stmt-&gt;execute() ){
          return 'Success';
      }
      else{
          $this-&gt;_log( $stmt-&gt;errorInfo() );
          return 'Action failed.';
      }
  </code></pre>
  
  <p>In the log, with backticks:</p>
  
  <pre><code>13:25:18    42S02
  1146
  Table 'db_name.'table-name'' doesn't exist
  </code></pre>
  
  <p>Without backticks:</p>
  
  <pre><code>13:38:14    42000
  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 ''table-name'
              SET status = NOT status
              WHERE id='1'' at line 1
  </code></pre>