I'm currently working on a project which includes your user system but with my image upload system built on top and I had an idea of adding some kind of "tagging" system.
For example, if you were to upload an image of say a Lamborghini you'd use the following tags: "Lamborghini, car"
I'm not quite sure how you would add the tags into a column with the image information, or would you have a completely new table? On top if this it would be great if a user could search for images and return the results if an image is found with the tags. (If you searched for "car", the previous image that was uploaded it would be returned).
Would be great to see how this could be done.
Tagging System
-
- Posts: 10
- Joined: Fri Nov 04, 2011 9:52 pm
- Contact:
Re: Tagging System
you could create a separate table for "keywords" or "tags" and link image ID to a tag in that table.
For example:
Image table:
ID - Name - Location
1 - Lamborghini.jpg - files/img/
2 - Flower.gif - files/img/
Keyword table:
ID - ImageID - Keyword
1 - 1 - Lamborghini
2 - 1 - Car
3 - 2 - Flower
4 - 2 - Blue
Or you could put the keywords in the same table as the images.
ID - Name - Location - Keyword
1 - Lamborghini.jpg - files/img/ - Lamborghini,Car
2 - Flower.gif - files/img/ - Flower,Blue
And then explode on the comma.
For example:
Image table:
ID - Name - Location
1 - Lamborghini.jpg - files/img/
2 - Flower.gif - files/img/
Keyword table:
ID - ImageID - Keyword
1 - 1 - Lamborghini
2 - 1 - Car
3 - 2 - Flower
4 - 2 - Blue
Or you could put the keywords in the same table as the images.
ID - Name - Location - Keyword
1 - Lamborghini.jpg - files/img/ - Lamborghini,Car
2 - Flower.gif - files/img/ - Flower,Blue
And then explode on the comma.