Thread: filter by size
View Single Post
Old March 8th, 2013, 10:30 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902


You can do something like this:

HTML Code:
<li><a href="[server.url type='fullpage' query='word=\"Extra Small\"|XS']">XSmall</a></li>
<li><a href="[server.url type='fullpage' query='word=Small|S']">Small</a></li>
<li><a href="[server.url type='fullpage' query='word=\"Medium Short\"|MS']">Medium Short</a></li>
There's 2 things going on there:

There's an OR operator being used: word=Small|S

There's also a phrasal search, too: word=\"Extra Small\"|XS

This would work for you except for one thing, MySQL by default only indexes words of 4 characters or more. Words of 3 characters or less are ignored. So in this example (and in your code) XS, S and MS will be ignored by MySQL.

You can ask your web host to decrease the minumum length of the word MySQL indexes however this will increase the size of your database as more words (the most common ones such as an, the, and, it, is, on, in, etc...) will be indexed.