summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/rddb.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rddb.pm b/lib/rddb.pm
index 7767fde..2881fb1 100755
--- a/lib/rddb.pm
+++ b/lib/rddb.pm
@@ -34,7 +34,8 @@ sub get_token
{
my ($dbh, $username) = @_;
- my $sth = $dbh->prepare('select PASSWORD from USERS where LOGIN_NAME = ?')
+ my $sql = qq{select PASSWORD from USERS where LOGIN_NAME = ?;};
+ my $sth = $dbh->prepare($sql)
or return (undef, 'ERROR', "Database Error: " . $dbh->errstr);
$sth->execute($username)
@@ -53,7 +54,8 @@ sub check_token
{
my ($dbh, $username, $token) = @_;
- my $sth = $dbh->prepare('select PASSWORD from USERS where LOGIN_NAME = ?')
+ my $sql = qq{select PASSWORD from USERS where LOGIN_NAME = ?;};
+ my $sth = $dbh->prepare($sql)
or return (0, 'ERROR', "Database Error: " . $dbh->errstr);
$sth->execute($username)