summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-12 21:34:51 +0000
committerchristopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-12 21:34:51 +0000
commitc24f5facf43ae43c3390931591248cac8f09c1a5 (patch)
treec26c09c3dc549aa70e21aab6d7ecf6b9930ec15a
parent67b84f7a38c60b8ec8bde69c52258522362508b6 (diff)
fixing unparametrised query
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@537 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/User.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm
index 95f3fc4f..7eb58a45 100755
--- a/LedgerSMB/User.pm
+++ b/LedgerSMB/User.pm
@@ -804,9 +804,8 @@ sub save_member {
# add login to employee table if it does not exist
my $login = $self->{login};
$login =~ s/@.*//;
- my $query = qq|SELECT id FROM employee WHERE login = '$login'|;
- my $sth = $dbh->prepare($query);
- $sth->execute;
+ my $sth = $dbh->prepare("SELECT id FROM employee WHERE login = ?;");
+ $sth->execute($login);
my ($id) = $sth->fetchrow_array;
$sth->finish;