PHP/MYSQL - Drop database using prepared statement
|Added at||2017-01-02 18:01|
I would like to drop a database using PDO.
This approach was the best one to me
But unfortunately, I got a PDOException saying that there is a syntax error near my binded value ($database) :
So I tried to perform the query as follow
And it works.
I was wondering why the prepared statement was not working and also, if the second query was secured.
Thanks in advance for your ideas !