Re: cvs: pearweb /public_html/bugs bug.php

From: Date: Tue, 26 Oct 2004 14:11:49 +0000
Subject: Re: cvs: pearweb /public_html/bugs bug.php
References: 1  Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-3295@lists.php.net to get a copy of this message
On Tue, Oct 26, 2004 at 12:54:42PM -0000, Helgi Þormar Þorbjörnsson wrote: > dufuz Tue Oct 26 08:54:42 2004 EDT > > Modified files: > /pearweb/public_html/bugs bug.php > Log: > Redirect to PECL if it's a PECL bug. > - users.showemail, users.handle > - FROM bugdb b LEFT JOIN bugdb_votes ON b.id=bug > - LEFT JOIN users ON users.email = b.email > - WHERE b.id='.(int)$id.' > + users.showemail, users.handle, p.package_type > + FROM bugdb b > + LEFT JOIN bugdb_votes ON b.id = bug > + LEFT JOIN users ON users.email = b.email > + LEFT JOIN packages p ON b.package_name = p.name > + WHERE b.id = '.(int)$id.' > GROUP BY bug'; While I generally love normalization of database tables, this is a case where denormalization makes sense. The bugdb table needs to have a column in it indicating if the bug is for pear or pecl. This will eliminate the need to do these joins here and throughout the bug system. These convolutions are huge on the bug search page and they introduced a bug in that page. If I remember correctly from several months ago, the query is incapable of properly showing bugs that are not in a given package, perhaps only when multiple packages are chosen. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.pear.webmaster (#3295) next »