You cannot parameterize table names, column names, or anything in an IN
clause (thanks to c0r0ner for pointing out the IN
clause restriction).
See this question, and subsequently this comment in the PHP manual.
More Related Contents:
- Can I bind an array to an IN() condition in a PDO query?
- PHP – Using PDO with IN clause array
- PDO Prepared Inserts multiple rows in single query
- PDO prepared statement – what are colons in parameter names used for?
- pdo prepared statements with wildcards
- Can I use a PDO prepared statement to bind an identifier (a table or field name) or a syntax keyword?
- Get last insert id after a prepared insert with PDO
- How do I use pdo’s prepared statement for order by and limit clauses?
- Insert multiple rows with PDO prepared statements
- Replacing mysql_* functions with PDO and prepared statements
- PHP PDO::bindParam() data types.. how does it work?
- Binding params for PDO statement inside a loop
- PDOstatement (MySQL): inserting value 0 into a bit(1) field results in 1 written in table
- Calling stored procedure with Out parameter using PDO
- When *not* to use prepared statements?
- Retrieve (or simulate) full query from PDO prepared statement
- PDO error: SQLSTATE[HY000]: General error: 2031
- Use of PDO in classes [duplicate]
- Error while using PDO prepared statements and LIMIT in query [duplicate]
- PDOException “could not find driver”
- Row count with PDO
- How to view query error in PDO PHP
- PHP PDO – Bind table name? [duplicate]
- How to debug PDO database queries?
- Resetting array pointer in PDO results
- Parametrized PDO query and `LIMIT` clause – not working [duplicate]
- Using htmlspecialchars function with PDO prepare and execute
- PDO::PARAM for type decimal?
- Alternative for mysql_num_rows using PDO
- PDO lastInsertId() always return 0