query on "process_cgi"

David Miller justdave at bugzilla.org
Wed Oct 4 06:18:25 UTC 2006

ukhas jean wrote on 10/4/06 1:21 AM:
> Hello Dave et al,
> Thanks ... i think i understand the logic behind it now ... one more
> question ... 
> Y is this SQL query required ?? i cant figure y deletion of keywords
> have to take place ... ??
> Following is snippet of code from process_bug.cgi:-
>    my $changed = 0;
>         if ($keywordaction eq "makeexact") {
>    SendSQL("DELETE FROM keywords WHERE bug_id = $id");
>       $changed = 1;
>         }

Because if you're making it exactly that list, then none of the existing
keywords need to be on that bug (well, maybe some of them might, but
it's easier to delete and re-add than to figure out which ones).  So it
deletes the entire existing list before adding the new ones.

Dave Miller                                   http://www.justdave.net/
System Administrator, Mozilla Corporation      http://www.mozilla.com/
Project Leader, Bugzilla Bug Tracking System  http://www.bugzilla.org/

More information about the developers mailing list