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 as how in wordpress an article can be in multiple
> categories like tech, current news, gadgets etc
>
> Was wondering how to do this, and please tell me if I am on the wrong path
> but:
> in the mysql db next to img name have a field called cate (or whatever for
> categories) and have a comma seperated list for each of the categories that
> the pic falls into and then do a mySql  LIKE '%$param%' search if the user
> wants 'birthday'?
>
> Is this how its done or am I barking up the wrong tree?
>
> TIA
> /R
> **
>
>
>

Well you could go with a comma separated list of keywords, or you could
build a keywords table, and then a table for associating each picture with a
given keyword.  So you have your images table with your image information,
then you have your keywords table with your keyword information, then an
associations table with the image id and keyword id link.  Either way should
work ok.

-- 
-Dan Joseph

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."

Reply via email to