From 77170ab9dd349eb3a9ebf15465806158f84e0a56 Mon Sep 17 00:00:00 2001 From: Tony Lambregts Date: Sun, 9 Jul 2006 06:08:00 +0000 Subject: [PATCH] Sort test results by rating --- include/distributions.php | 6 ++++-- tables/testResults.sql | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/distributions.php b/include/distributions.php index 8bf65db..eaf944c 100644 --- a/include/distributions.php +++ b/include/distributions.php @@ -50,7 +50,8 @@ class distribution{ { $sQuery = "SELECT testingId FROM testResults - WHERE distributionId = '?'"; + WHERE distributionId = '?' + ORDER BY testedRating;" ; } else /* only let users view test results that aren't queued and for apps that */ /* aren't queued or versions that aren't queued */ { @@ -61,7 +62,8 @@ class distribution{ appFamily.appId = appVersion.appId AND appFamily.queued = 'false' AND appVersion.queued = 'false' AND - distributionId = '?'"; + distributionId = '?' + ORDER BY testedRating;"; } if($hResult = query_parameters($sQuery, $iDistributionId)) diff --git a/tables/testResults.sql b/tables/testResults.sql index 0d6b2d0..cff28ae 100644 --- a/tables/testResults.sql +++ b/tables/testResults.sql @@ -16,7 +16,7 @@ create table testResults ( testedRelease tinytext, installs enum('Yes','No','N/A') NOT NULL default 'Yes', runs enum('Yes','No','Not Installable') NOT NULL default 'Yes', - testedRating tinytext, + testedRating enum('Platinum','Gold','Silver','Bronze','Garbage') NOT NULL, comments text, submitTime timestamp(14) NOT NULL, submitterId int(11) NOT NULL default '0',