powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
I am very concerned about the second limit number, since $max_recs1 is this: $max_recs1 = param("max_rec"); So if I put it in the query itself, and someone posted to the search form, a max_rec value of 100 DELETE FROM products or something like that I don't know that it would work, but if it did, that COULD be disasterous.$sth = $dbh->prepare("SELECT * FROM products WHERE ? IN (prod_name +,prod_desc) LIMIT 0,?"); $sth->execute($search_term,$max_recs1);
10 is the number I selected when I tested the search.DBD::mysql::st execute failed: You have an error in your SQL syntax ne +ar ''10'' at line 1 at /home/user/path/to/pages/products.dat line 182 +6.
Title edit by tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: security question...
by dws (Chancellor) on Apr 25, 2003 at 08:29 UTC | |
Re: security question...
by ajt (Prior) on Apr 25, 2003 at 08:42 UTC | |
Re: security question...
by Tanalis (Curate) on Apr 25, 2003 at 08:37 UTC | |
Re: security question...
by Abigail-II (Bishop) on Apr 25, 2003 at 09:09 UTC | |
Re: security question...
by Biker (Priest) on Apr 25, 2003 at 08:35 UTC | |
Re: security question...
by zby (Vicar) on Apr 25, 2003 at 09:17 UTC | |
Re: security question...
by mce (Curate) on Apr 25, 2003 at 09:22 UTC | |
Re: security question, mysql, limit, dbi, and placeholders
by Anonymous Monk on Apr 25, 2003 at 20:38 UTC | |
by pfaut (Priest) on Apr 25, 2003 at 21:05 UTC | |
Re: security question, mysql, limit, dbi, and placeholders
by powerhouse (Friar) on Apr 25, 2003 at 15:43 UTC |