in reply to Re: Re: passing parameters
in thread passing parameters
The reason being that it will help protect versus attacks. For example, let's say $username is q{'; delete from password where username != 'NOT THERE''}. You'll lose all your password table entries.my $sql = "SELECT pass FROM password WHERE username = ?"; my $sth = $dbh->prepare_cached($sql) || die "Cannot prepare '$sql'\n"; $sth->execute($username) || die "Cannot execute '$sql' with '$username +'\n";
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re3: passing parameters
by diotalevi (Canon) on Jul 21, 2003 at 14:04 UTC |