in reply to Re^6: CGI Action call
in thread CGI Action call
What is the value of $searchfield? You don't show it to us so we have to guess. This makes it much harder to provide you concise help. Please adjust your debugging process and tell us what you see/output instead of making us guess.
My guess is that $searchfield contains the string id or some other string that you want to be interpreted as column name.
Did you read the section about placeholders in DBI?
Most likely, you skipped over the part where it tells you where placeholders can be used:
Placeholders, also called parameter markers, are used to indicate values in a database statement that will be supplied later, ...
With most drivers, placeholders can't be used for any element of a statement that would prevent the database server from validating the statement and creating a query execution plan for it.
Naturally, you can't supply the name of a column as a placeholder because the database can't validate your statement before seeing the column name.
What happens instead is that your database treats all placeholders as values and never compares the columns but just values of the placeholders.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: CGI Action call
by tultalk (Monk) on Mar 20, 2018 at 00:24 UTC | |
by poj (Abbot) on Mar 20, 2018 at 09:31 UTC | |
by Corion (Patriarch) on Mar 20, 2018 at 08:07 UTC | |
by tultalk (Monk) on Mar 20, 2018 at 09:30 UTC | |
by Corion (Patriarch) on Mar 20, 2018 at 09:50 UTC | |
by tultalk (Monk) on Mar 20, 2018 at 11:28 UTC | |
| |
by marto (Cardinal) on Mar 20, 2018 at 10:08 UTC |