[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [533] trunk/import_members.pl



Revision: 533
          http://svn.sourceforge.net/ledger-smb/?rev=533&view=rev
Author:   tetragon
Date:     2006-11-12 12:46:26 -0800 (Sun, 12 Nov 2006)

Log Message:
-----------
parametrise unparametrised query

Modified Paths:
--------------
    trunk/import_members.pl

Modified: trunk/import_members.pl
===================================================================
--- trunk/import_members.pl	2006-11-12 19:53:08 UTC (rev 532)
+++ trunk/import_members.pl	2006-11-12 20:46:26 UTC (rev 533)
@@ -213,9 +213,9 @@
 		# 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 $query = qq|SELECT id FROM employee WHERE login = ?|;
 		my $sth = $dbh->prepare($query);
-		$sth->execute;
+		$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.