prepared statement - Perl: Using DBI placeholders for ORDER BY clause -


Can I use the placeholder in the statement prepared for the order of my inquiry section?

I am not trying to do it, and it does not seem to work, but it did not throw any errors, which seemed strange.

Is there a better way to do this simply generating a SQL string with valid input?

No, you can not use placeholder for column name. From:

With most drivers, placeholders can not be used for any element that prevents the database server from validating the statement and making a query execution plan for it. Could.

But still you can create a query in Perl. In this case, use the method to extract column names.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -