M
M
Mr Phunker2015-11-01 18:09:44
PHP
Mr Phunker, 2015-11-01 18:09:44

Is it possible to generate such a PDO request?

"SELECT * FROM table WHERE :key=:value"?
How to do it? Sampling does not occur with standard prepared query methods.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2015-11-01
@makcvsdog

No. In PDO, field and table names cannot be bound by placeholders.
Alternatively, you can prepare the query before prepare, substituting the field name using standard php tools

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question