# Tag based searching in MySQL

**URL:** <https://forum.kirupa.com/t/tag-based-searching-in-mysql/247683>\
**Category:** Uncategorized\
**Created:** [December 28, 2007, 2:57am UTC](https://forum.kirupa.com/t/tag-based-searching-in-mysql/247683 "2007-12-28T02:57:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorren\_biffin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lorren_biffin/32/2726_2.png) [@lorren\_biffin](https://forum.kirupa.com/u/lorren_biffin)\
**Post date:** [December 28, 2007, 2:57am UTC](https://forum.kirupa.com/t/tag-based-searching-in-mysql/247683/1 "2007-12-28T02:57:55Z")

</div>

So, I’m working on a web-app that uses tag-based searching of items in a database (well, it does more than that, but for the purpose of this post, that’s what it does).

Say I’ve got a table row with the following column and row values:  
[LIST=1]  
[_]\*\*id:\*\*1  
[_] **photo:** neato\_picture.jpg  
[_] **tags:** Cool, Awesome, Friends, Funny[/LIST][LIST=1]  
[_] **id:** 2  
[_] **photo:** blowfish.jpg  
[_] **tags:** Aqua, Fish, Funny, Ocean Cool[/LIST]Anyhow, you get the idea. Say I have those two rows in my DB (the rows’ contents are irrelevant)

What does the query look like to look through the `tags` column and return all rows that have the tag ‘Cool’ associated with them.

Thanks in advance guys! 🙂 Any help is appreciated.
