in reply to Re^8: CGI Action call
in thread CGI Action call
The code below demonstates use of a placeholder for a field name (lastname) and this works. ...my $stmt = "SELECT * FROM users WHERE $searchfield = ? ORDER BY ? ASC" +; warn("statement = '$stmt'");[Mon Mar 19 19:01:04 2018] update_tables.cgi: statement = 'SELECT * F +ROM users WHERE lastname = ? ORDER BY ? ASC' at update_tables.cgi lin +e 462.
No. It does not use a placeholder for lastname. It interpolates $searchfield directly into the query. It uses a placeholder for the column value, but that is different from the column name.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: CGI Action call
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 poj (Abbot) on Mar 20, 2018 at 11:41 UTC | |
by davies (Monsignor) on Mar 20, 2018 at 12:59 UTC | |
by marto (Cardinal) on Mar 20, 2018 at 10:08 UTC |