[Solved] Brainstorming... a possible solution to 2-3 letter tag searches

shadlaws

Joined: 2012-03-14
Posts: 183
Posted: Sun, 2012-04-01 16:41

Hey everyone,

It's well-known that most shared hosting doesn't allow 2-3 letter SQL searches (see http://gallery.menalto.com/node/89346). This really sucks if you've tagged a bunch of images with 3-letter names. I'd like to figure out a solution to this.

So... do you think it'd be a decent idea to build up a tag pre- and post- processor? The idea is to have all of the tags stored in sql with extra characters added, then edit the tag and search functions to not show them.

For example, we can append "tag" to the start of every tag in sql. Then, when searching for "mysearch," we can add "tagmysearch" to the query. When getting/displaying tags, we'd do the opposite - strip the leading tag from the names. This essentially tricks mySQL into always searching for things that are 4+ characters long, thereby circumventing the shared hosting limitations.

I was thinking of hacking/coding something like this up, but was curious on your feedback beforehand. Whaddayathink?

EDIT: I found the solution and posted it to a new topic at http://gallery.menalto.com/node/105921.

Thanks!

Take care,
Shad