New to the site? Welcome!

You might be interested to know that there's two different kind of posts on this blog: "Thought of the Day" and "Normal". The "Thought of the Day" category is a once-a-day random tidbit, usually a funny video or picture, and the "Normal" is just what you'd expect from a blog like this:

Unicorn-Butterfly Soup.

--Kyle

p.s. the subscription options to the left (psst! <---- that way) reflect the same content options

MySQL Search

I’m looking at how I can replace the current search for mySHOUToutLOUD (http://www.myshoutoutloud.com) to be more beneficial.

Right now, it’s a pretty basic MySQL Query. Here’s an example of searching for a user:

$sql = mysql_query(”SELECT * FROM $haystack WHERE username LIKE ‘%$needle%’ OR fname LIKE ‘%$needle%’ LIMIT $position,15″);

Limitations:

  • Can’t use Google Custom Search/Co-Op, as the data is all walled away.
  • Can’t use a Google Search Appliance, as the server is not mine (rent from MediaTemple).
  • Can’t use an Apache module, like Lucene, since (mt) doesn’t have it on the (gs) plans, and will not install it for me.
  • Other spidering techniques, using text-file caches, are very slow.

So, basically it has to be a very fancy MySQL Query. I’ve been thinking about how to write it…

Any suggestions?






 
close Reblog this comment
blog comments powered by Disqus
Ads
<< PreviousNext >>