Table 1: ID, item
Table 2: ID, tag
the one-to-many relationship goes from Table 1 to Table 2, i.e. there are many tags for each item.
when I query the database for a particular item, i wish it would return ONE record for that item. but alas, if I have 4 tags for that item, then i get 4 records returned.
this is how mysql works of course.
but how can i get around this? i want all the tags to come with it, but I only want one record returned, so my output would be:
item, tag1, tag2, tag3, tag4
Instead of
item, tag, item, tag, item, tag, item, tag
It seems like there should be a way to take advantage of this wonderful relational database architecture and return/update/delete just the data I want (i.e. it should know how to follow the relational/foreign keys)
Know what i mean dudes?? 😕