diff options
author | 2005-03-10 15:49:41 +0000 | |
---|---|---|
committer | 2005-03-10 15:49:41 +0000 | |
commit | a46f353a0a226e45a80be2dd07adc78128f4df03 (patch) | |
tree | 0d501f62da63de5c9acf1bae3ff41367c85dd84b /globals.pl | |
parent | Bug 285551: Schema::Pg should explictly set "timestamp without time zone" and... (diff) | |
download | bugzilla-a46f353a0a226e45a80be2dd07adc78128f4df03.tar.gz bugzilla-a46f353a0a226e45a80be2dd07adc78128f4df03.tar.bz2 bugzilla-a46f353a0a226e45a80be2dd07adc78128f4df03.zip |
Bug 285532: GetSelectableProducts cannot run on PostgreSQL when classifications are enabled
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=Tomas.Kopal, a=justdave
Diffstat (limited to 'globals.pl')
-rw-r--r-- | globals.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/globals.pl b/globals.pl index 44bf7dc3e..53119c034 100644 --- a/globals.pl +++ b/globals.pl @@ -509,7 +509,8 @@ sub GetSelectableProducts { my $extra_sql = $by_id ? "id, " : ""; - my $extra_from_sql = $by_classification ? ", classifications" : ""; + my $extra_from_sql = $by_classification ? " INNER JOIN classifications" + . " ON classifications.id = products.classification_id" : ""; my $query = "SELECT $extra_sql products.name " . "FROM products $extra_from_sql " . @@ -527,7 +528,6 @@ sub GetSelectableProducts { } $query .= "WHERE group_id IS NULL "; if ($by_classification) { - $query .= "AND classifications.id = products.classification_id "; $query .= "AND classifications.name = "; $query .= SqlQuote($by_classification) . " "; } |