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

SF.net SVN: ledger-smb: [1445] branches/1.2/LedgerSMB/CT.pm



Revision: 1445
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1445&view=rev
Author:   einhverfr
Date:     2007-07-26 22:08:24 -0700 (Thu, 26 Jul 2007)

Log Message:
-----------
Correcting SQL Query errors for customer search, 1761615

Modified Paths:
--------------
    branches/1.2/LedgerSMB/CT.pm

Modified: branches/1.2/LedgerSMB/CT.pm
===================================================================
--- branches/1.2/LedgerSMB/CT.pm	2007-07-27 05:07:34 UTC (rev 1444)
+++ branches/1.2/LedgerSMB/CT.pm	2007-07-27 05:08:24 UTC (rev 1445)
@@ -593,15 +593,15 @@
     push @a, qw(name contact city state zipcode country notes phone email);
 
     if ( $form->{employee} ) {
-        $var = $form->like( lc $form->{employee} );
-        $where .= " AND lower(e.name) LIKE '$var'";
+        $var = $dbh->quote($form->like(lc $form->{employee}));
+        $where .= " AND lower(e.name) LIKE $var";
     }
 
     foreach $item (@a) {
 
         if ( $form->{$item} ne "" ) {
-            $var = $form->like( lc $form->{$item} );
-            $where .= " AND lower(ct.$item) LIKE '$var'";
+            $var = $dbh->quote($form->like( lc $form->{$item}) );
+            $where .= " AND lower(ct.$item) LIKE $var";
         }
     }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.