Code

Correct syntax (hope so) - vacumm table has no effect.
[gosa.git] / gosa-si / modules / GosaSupportDaemon.pm
index bd929597b7acecbb7ce65041bd66f59bb840d389..a14d5def0d4621b96c32d9ade846b21e067987f7 100644 (file)
@@ -264,10 +264,15 @@ sub get_where_statement {
                 my @xml_tags = keys %{$phrase};
                 my $tag = $xml_tags[0];
                 my $val = $phrase->{$tag}[0];
-                push(@phrase_l, "$tag$operator'$val'");
+                               # integer columns do not have to have single quotes besides the value
+                               if ($tag eq "id") {
+                                               push(@phrase_l, "$tag$operator$val");
+                               } else {
+                                               push(@phrase_l, "$tag$operator'$val'");
+                               }
             }
             my $clause_str .= join(" $connector ", @phrase_l);
-            push(@clause_l, $clause_str);
+            push(@clause_l, "($clause_str)");
         }
 
         if( not 0 == @clause_l ) {