Re: Category question
| From: | Davey | Date: | Sun, 18 May 2003 11:45:28 +0000 |
| Subject: | Re: Category question | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16438@lists.php.net to get a copy of this message | ||
One of the reasons I suggested the CSV was thinking about when mirrors get in on the act... but I guess the small addition of a second table isn't going to put them off :)
btw, thought I didn't mention it, I'm also +1 for this and will gladly help with any changes that are chosen to be implemented...
- Davey
Xavier Noguer wrote:
--------- Original Message -------- From: davey@php.net To: pear-dev@lists.php.net <pear-dev@lists.php.net> Subject: Re: [PEAR-DEV] Category question Date: 18/05/03 01:54on the DB end, you could just store a CSV list of catagories in the catagory column... in fact this is probably the best way to stop having limits on the number of catagories a package can be in. Or theres the other way of creating a second table with id,package_id,catagory_id and just cross referencing... but this is quite a bit more work (for PHP/the RDBMS) to do... and so I'd suggest using the CSV with a simple explode.I hope we can give ourselves the luxury of having a normalized DB :) I'll wait to hear Martin's or Thomas's opinion on this, since they would have to be the ones making the actual changes.And by changing the select box to a mutliple select box (and its name to an array) you just simply implode(',',$catagories) and insert that into the DB. - Davey Xavier Noguer wrote: > BIG +1 > > Although this makes me think PEAR's data model will have to change: > > $query = "INSERT INTO packages > (id,name,category,license,summary,description,homepage) > VALUES(?,?,?,?,?,?,?)"; > > It assumes packages belong to just one category. > > --------- Original Message -------- > From: Greg Beaver <greg@chiaraquartet.net> > To: pear-dev@lists.php.net <pear-dev@lists.php.net> > Subject: [PEAR-DEV] Category question > Date: 18/05/03 00:03 > > >>Hi, >> >>I'd like to open a can of worms for future discussion :). >> >>When I'm trying to find a package, it is often difficult to figureout>>exactly which category it belongs in. Why not allow packages tofall>>into more than one category? For instance, the Tree class would >>logically be placed into Structures, DB, and XML since it is allthree.and>> I would really like to see PEAR become more user-friendly,>>this is definitely a way to do that. Perhaps documentation couldalso>>be generated in those categories as in: >> >>Tree docs are under Structures, and a &quot;SeeStructures::Tree&quot;> > link (like > >>the Yellow Pages under Cab says &quot;See Taxi&quot;) isin XML and DB> > docs for Tree. > >>This would certainly cut down on the questions &quot;is thisin> > PEAR?&quot; since > >>things would be filed under the multiple categories they belongin.>>Most packages probably fit into one category, but this would also >>satisfy ambiguities like template engines, which really should be >>categorized under both HTML and Templates, for example. Thiswould also>>allow placing core packages under their respective categories, andunder>>core (or PFC or whatever it will be called). >> >>Greg >> >> >>-- >>PEAR Development Mailing List (http://pear.php.net/) >>To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> >> >> > > -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php