I have started to use prepared statements in my php,mysql based application.
As I learnt that prepared statement queries will be compiled only once, should we use unique variable names for the queries and the statements prepared for them ?
Will it clash if we use same variable names to store the queries or the statements ?
I have started to use prepared statements in my php,mysql based application. As I
Share
It works only within the same mysql session.
So, most likely you will run your prepared queries only once, with no use of such a widely advertised “benefit”.
Anyway, the variable that contains the query affects nothing but if you rewrite a variable contains prepared statement, you will prepare another query, which is obvious.