From 9a7d57b77bf780a19ca67649ca13d2eec8c7ce47 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 6 Jun 2005 00:54:50 +0000 Subject: [PATCH] r237: Optimizing selects by stating exactly what we want --- showreport.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/showreport.php b/showreport.php index 6459207..dbaffc8 100644 --- a/showreport.php +++ b/showreport.php @@ -61,9 +61,9 @@ $bug['assigninfo'] = ((is_array($assigninfo)) ? construct_user_display($assignin $show['editreport'] = ((((can_perform('caneditown') AND $bugsys->userinfo['userid'] == $comment['userid']) OR can_perform('caneditothers')) AND can_perform('caneditinfo')) ? true : false); -$duplicateof = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = $bug[duplicateof]"); +$duplicateof = $db->query_first("SELECT bugid, summary FROM " . TABLE_PREFIX . "bug WHERE bugid = $bug[duplicateof]"); -$duplicates = $db->query("SELECT * FROM " . TABLE_PREFIX . "bug WHERE duplicateof = $bug[bugid]"); +$duplicates = $db->query("SELECT bugid, summary FROM " . TABLE_PREFIX . "bug WHERE duplicateof = $bug[bugid]"); while ($duplicate = $db->fetch_array($duplicates)) { $dupelist[] = "$duplicate[summary]"; @@ -72,7 +72,7 @@ $dupelist = implode(', ', $dupelist); if ($bug['dependency']) { - $dependencies = $db->query("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid IN ($bug[dependency])"); + $dependencies = $db->query("SELECT bugid, summary FROM " . TABLE_PREFIX . "bug WHERE bugid IN ($bug[dependency])"); while ($dependency = $db->fetch_array($dependencies)) { $depends[] = "$dependency[bugid]"; -- 2.43.5