From 61ddf0a32846fdf2607043d94af1a0a86b80f6fc Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Mon, 12 Aug 2002 12:42:42 +0000 Subject: Bug 43600 - Convert products/components to use ids instead of names. Initial attempt by jake@bugzilla.org, updated by me r=joel, preed --- editusers.cgi | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'editusers.cgi') diff --git a/editusers.cgi b/editusers.cgi index f9800c704..0e25f0ac3 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -579,9 +579,10 @@ if ($action eq 'del') { # Check if the user is an initialowner my $nodelete = ''; - SendSQL("SELECT program, value - FROM components - WHERE initialowner=" . DBname_to_id($user)); + SendSQL("SELECT products.name, components.name " . + "FROM products, components " . + "WHERE products.id = components.product_id " . + " AND initialowner=" . DBname_to_id($user)); $found = 0; while (MoreSQLData()) { if ($found) { @@ -603,9 +604,10 @@ if ($action eq 'del') { # Check if the user is an initialqacontact - SendSQL("SELECT program, value - FROM components - WHERE initialqacontact=" . DBname_to_id($user)); + SendSQL("SELECT products.name, components.name " . + "FROM products, components " . + "WHERE products.id = components.id " . + " AND initialqacontact=" . DBname_to_id($user)); $found = 0; while (MoreSQLData()) { if ($found) { -- cgit v1.2.1