Author: Derick Rethans (derickr)
Date: 2024-08-26T10:01:16+01:00

Commit: 
https://github.com/php/web-master/commit/3b30d6613f77b872899b3635b83b0f87c85e171e
Raw diff: 
https://github.com/php/web-master/commit/3b30d6613f77b872899b3635b83b0f87c85e171e.diff

No need to calculate total three times

Changed paths:
  M  scripts/email-note-summaries


Diff:

diff --git a/scripts/email-note-summaries b/scripts/email-note-summaries
index 1fa124f..5a03be6 100755
--- a/scripts/email-note-summaries
+++ b/scripts/email-note-summaries
@@ -46,9 +46,6 @@ foreach ($result as $row) {
     $table .= sprintf("%5d  | https://php.net/manual/en/%s.php#%s\n";, 
$row['weight'], $row['sect'], $row['note_id']);
 }
 
-$query = "SELECT COUNT(*) FROM note";
-$total = $pdo->single($query);
-
 $body .= "Following are the top " . LIMIT. " notes with the highest rating, 
sorted by rating.\n"
       . "These notes are prime candidates for being integrated into the 
manual.\n\n"
       . $table;
@@ -68,9 +65,6 @@ foreach ($result as $row) {
     $table .= sprintf("%5d  | https://php.net/manual/en/%s.php#%s\n";, 
$row['weight'], $row['sect'], $row['note_id']);
 }
 
-$query = "SELECT COUNT(*) FROM note";
-$total = $pdo->single($query);
-
 $body .= "Following are the bottom " . LIMIT. " notes with the lowest rating, 
sorted by rating.\n"
       . "These notes are prime candidates for being removed.\n\n"
       . $table;

Reply via email to