Re: [PHP] Categories like wordpress

2008-05-01 Thread Chris
Ryan S wrote: > Hey, > Am not really used to using the JOIN in SQL so am a bit confused as to what > kind of data I need to enter into this table: > > image_category_mapping table: > - image_id > - category_id It comes down to database normalization (http://en.wikipedia.org/wiki/Database_normali

Re: [PHP] Categories like wordpress

2008-05-01 Thread Ryan S
Hey, Am not really used to using the JOIN in SQL so am a bit confused as to what kind of data I need to enter into this table: image_category_mapping table: - image_id - category_id for all of this to work... mind explaining a bit? Thanks! Ryan _

Re: [PHP] Categories like wordpress

2008-05-01 Thread Brady Mitchell
On May 1, 2008, at 843AM, Richard Heyes wrote: it's the most flexible and fastest to query. Mmm, that's debateable. Not knowing the ins and outs of MySQL I'd hazard a guess that reading an extra 255 bytes from the table file might be faster in some circumstances than opening two extra tab

Re: [PHP] Categories like wordpress

2008-05-01 Thread Ryan S
Hey! Thanks for replying guys! > 1. Fully normalised, where you have three tables - one for your > "articles", one for your categories and a link table. This is the route that I would suggest, it's the most flexible and fastest to query. Anyone happen to have a little PHP code as an

Re: [PHP] Categories like wordpress

2008-05-01 Thread Richard Heyes
it's the most flexible and fastest to query. Mmm, that's debateable. Not knowing the ins and outs of MySQL I'd hazard a guess that reading an extra 255 bytes from the table file might be faster in some circumstances than opening two extra table files. And I don't see why it's more flexible...

Re: [PHP] Categories like wordpress

2008-05-01 Thread Brady Mitchell
On May 1, 2008, at 743AM, Richard Heyes wrote: Is this how its done or am I barking up the wrong tree? You have multiple options: 1. Fully normalised, where you have three tables - one for your "articles", one for your categories and a link table. This is the route that I would suggest, i

Re: [PHP] Categories like wordpress

2008-05-01 Thread Richard Heyes
Is this how its done or am I barking up the wrong tree? You have multiple options: 1. Fully normalised, where you have three tables - one for your "articles", one for your categories and a link table. 2. A "SET" MySQL datatype which will allow upto 32 predefined categories. 3. A simple CH

Re: [PHP] Categories like wordpress

2008-05-01 Thread Dan Joseph
On Thu, May 1, 2008 at 9:23 AM, Ryan S <[EMAIL PROTECTED]> wrote: > Hey! > > Heres what i have to do, upload pics and each pic can be a part of x > number of categores > > for example: > A picture of a rose can be for birthday, as well as anniversary, or miss > you, or love etc > exactly the same

[PHP] Categories like wordpress

2008-05-01 Thread Ryan S
Hey! Heres what i have to do, upload pics and each pic can be a part of x number of categores for example: A picture of a rose can be for birthday, as well as anniversary, or miss you, or love etc exactly the same as how in wordpress an article can be in multiple categories like tech, current