summaryrefslogtreecommitdiffstats
path: root/queryhelp.cgi
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-08-12 14:42:42 +0200
committerbbaetz%student.usyd.edu.au <>2002-08-12 14:42:42 +0200
commit61ddf0a32846fdf2607043d94af1a0a86b80f6fc (patch)
tree714517b4c6b9e33b10a12aa5a4b99641bcafefef /queryhelp.cgi
parent17b301e76d886afd5be8f4e9919afb4446e49405 (diff)
downloadbugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.gz
bugzilla-61ddf0a32846fdf2607043d94af1a0a86b80f6fc.tar.xz
Bug 43600 - Convert products/components to use ids instead of names.
Initial attempt by jake@bugzilla.org, updated by me r=joel, preed
Diffstat (limited to 'queryhelp.cgi')
-rwxr-xr-xqueryhelp.cgi8
1 files changed, 6 insertions, 2 deletions
diff --git a/queryhelp.cgi b/queryhelp.cgi
index 89db7b5cb..16acf73f1 100755
--- a/queryhelp.cgi
+++ b/queryhelp.cgi
@@ -660,7 +660,7 @@ print qq{
};
-SendSQL("SELECT product,description FROM products ORDER BY product");
+SendSQL("SELECT name, description FROM products ORDER BY name");
while (MoreSQLData()) {
my ($product, $productdesc) = FetchSQLData();
@@ -725,7 +725,11 @@ components and their associated products:
foreach $product (@products)
{
- SendSQL("SELECT value,description FROM components WHERE program=" . SqlQuote($product) . " ORDER BY value");
+ SendSQL("SELECT components.name, components.description " .
+ "FROM components, products " .
+ "WHERE components.product_id = products.id" .
+ " AND products.name = " . SqlQuote($product) .
+ "ORDER BY name");
while (MoreSQLData()) {