[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1447] branches/1.2/LedgerSMB
- Subject: SF.net SVN: ledger-smb: [1447] branches/1.2/LedgerSMB
- From: ..hidden..
- Date: Thu, 26 Jul 2007 22:29:00 -0700
Revision: 1447
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1447&view=rev
Author: einhverfr
Date: 2007-07-26 22:29:00 -0700 (Thu, 26 Jul 2007)
Log Message:
-----------
Fixing a large number of SQL errors in certain circumstances
Modified Paths:
--------------
branches/1.2/LedgerSMB/AA.pm
branches/1.2/LedgerSMB/CT.pm
branches/1.2/LedgerSMB/OE.pm
branches/1.2/LedgerSMB/PE.pm
Modified: branches/1.2/LedgerSMB/AA.pm
===================================================================
--- branches/1.2/LedgerSMB/AA.pm 2007-07-27 05:23:50 UTC (rev 1446)
+++ branches/1.2/LedgerSMB/AA.pm 2007-07-27 05:29:00 UTC (rev 1447)
@@ -861,12 +861,12 @@
$where .= qq|
AND (a.id IN (SELECT DISTINCT trans_id
FROM acc_trans
- WHERE lower(memo) LIKE '$var')
+ WHERE lower(memo) LIKE $var)
OR a.id IN
(SELECT DISTINCT trans_id
FROM invoice
WHERE lower(description)
- LIKE '$var'))|;
+ LIKE $var))|;
}
$query .= "WHERE $where
Modified: branches/1.2/LedgerSMB/CT.pm
===================================================================
--- branches/1.2/LedgerSMB/CT.pm 2007-07-27 05:23:50 UTC (rev 1446)
+++ branches/1.2/LedgerSMB/CT.pm 2007-07-27 05:29:00 UTC (rev 1447)
@@ -882,7 +882,7 @@
$form->sort_order();
if ( $form->{"$form->{db}number"} ne "" ) {
- $var = $dbh->( $form->like( lc $form->{"$form->{db}number"} ) );
+ $var = $dbh->quote( $form->like( lc $form->{"$form->{db}number"} ) );
$where .= " AND lower(ct.$form->{db}number) LIKE $var";
}
@@ -900,8 +900,8 @@
}
if ( $form->{employee} ne "" ) {
- $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";
}
$transwhere .=
Modified: branches/1.2/LedgerSMB/OE.pm
===================================================================
--- branches/1.2/LedgerSMB/OE.pm 2007-07-27 05:23:50 UTC (rev 1446)
+++ branches/1.2/LedgerSMB/OE.pm 2007-07-27 05:29:00 UTC (rev 1447)
@@ -197,10 +197,10 @@
}
if ( $form->{description} ne "" ) {
- $var = $form->like( lc $form->{description} );
+ $var = $dbh->quote($form->like( lc $form->{description} ));
$query .= " AND o.id IN (SELECT DISTINCT trans_id
FROM orderitems
- WHERE lower(description) LIKE '$var')";
+ WHERE lower(description) LIKE $var)";
push @queryargs, $var;
}
@@ -1992,12 +1992,12 @@
if ( $form->{partnumber} ne "" ) {
$var = $dbh->quote( $form->like( lc $form->{partnumber} ) );
$where .= "
- AND lower(p.partnumber) LIKE '$var'";
+ AND lower(p.partnumber) LIKE $var";
}
if ( $form->{description} ne "" ) {
$var = $dbh->quote( $form->like( lc $form->{description} ) );
$where .= "
- AND lower(p.description) LIKE '$var'";
+ AND lower(p.description) LIKE $var";
}
if ( $form->{partsgroup} ne "" ) {
( $null, $var ) = split /--/, $form->{partsgroup};
Modified: branches/1.2/LedgerSMB/PE.pm
===================================================================
--- branches/1.2/LedgerSMB/PE.pm 2007-07-27 05:23:50 UTC (rev 1446)
+++ branches/1.2/LedgerSMB/PE.pm 2007-07-27 05:29:00 UTC (rev 1447)
@@ -987,7 +987,7 @@
if ( $form->{partsgroup} ne "" ) {
$var = $dbh->quote( $form->like( lc $form->{partsgroup} ) );
- $where .= " AND lower(partsgroup) LIKE '$var'";
+ $where .= " AND lower(partsgroup) LIKE $var";
}
$query .= qq| WHERE $where ORDER BY $sortorder|;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.