[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [537] trunk/LedgerSMB/User.pm
- Subject: SF.net SVN: ledger-smb: [537] trunk/LedgerSMB/User.pm
- From: ..hidden..
- Date: Sun, 12 Nov 2006 13:34:53 -0800
Revision: 537
http://svn.sourceforge.net/ledger-smb/?rev=537&view=rev
Author: christopherm
Date: 2006-11-12 13:34:51 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
fixing unparametrised query
Modified Paths:
--------------
trunk/LedgerSMB/User.pm
Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm 2006-11-12 21:30:47 UTC (rev 536)
+++ trunk/LedgerSMB/User.pm 2006-11-12 21:34:51 UTC (rev 537)
@@ -804,9 +804,8 @@
# 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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.