]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 247772: Improve SQL capitalization in collectstats; r=joel; a=justdave.
authorjocuri%softhome.net <>
Tue, 22 Jun 2004 15:00:58 +0000 (15:00 +0000)
committerjocuri%softhome.net <>
Tue, 22 Jun 2004 15:00:58 +0000 (15:00 +0000)
collectstats.pl

index ec6b4cf70d9bcb30f9d8d29e36ed86aad2b3db9d..3bf95ce37e70c938e0efe93999aa9e0ffc19faf7 100755 (executable)
@@ -139,9 +139,9 @@ sub collect_stats {
 
         foreach my $status ('NEW', 'ASSIGNED', 'REOPENED', 'UNCONFIRMED', 'RESOLVED', 'VERIFIED', 'CLOSED') {
             if( $product eq "-All-" ) {
-                SendSQL("select count(bug_status) from bugs where bug_status='$status'");
+                SendSQL("SELECT COUNT(bug_status) FROM bugs WHERE bug_status='$status'");
             } else {
-                SendSQL("select count(bug_status) from bugs where bug_status='$status' and product_id=$product_id");
+                SendSQL("SELECT COUNT(bug_status) FROM bugs WHERE bug_status='$status' AND product_id=$product_id");
             }
 
             push @row, FetchOneColumn();
@@ -149,9 +149,9 @@ sub collect_stats {
 
         foreach my $resolution ('FIXED', 'INVALID', 'WONTFIX', 'LATER', 'REMIND', 'DUPLICATE', 'WORKSFORME', 'MOVED') {
             if( $product eq "-All-" ) {
-                SendSQL("select count(resolution) from bugs where resolution='$resolution'");
+                SendSQL("SELECT COUNT(resolution) FROM bugs WHERE resolution='$resolution'");
             } else {
-                SendSQL("select count(resolution) from bugs where resolution='$resolution' and product_id=$product_id");
+                SendSQL("SELECT COUNT(resolution) FROM bugs WHERE resolution='$resolution' AND product_id=$product_id");
             }
 
             push @row, FetchOneColumn();