I am trying to write a function that takes the variable written in the function placeholder() written below and then uses that in MySQL queries
placeholder()
SQL parameters cannot be used for metadata with MySQL. You will need to sanitize the value and substitute it normally.