Jump to content

Search engine finding similar words...


Perfidus

Recommended Posts

Its possible, not quite sure how, but I have seen it. dropnames.com and godaddy.com are two examples.. dropnames.com or justdropped.com I cant remeber. but they both use it in a sence not so much godaddy as the drop names site.

A basic way would be:

$s = "SELECT * FROM blogs WHERE blog LIKE '%arch%' ";

But it wouldn't get the third and would get loads more besides. This version would get the first two...

$s = "SELECT * FROM blogs WHERE blog LIKE '_earch%' ";

To explain, an '_' matches a single character, a '%' matches multiple characters.

 

If you wanted to get technical there is the 'REGEXP' feature. With this you could break the search word into a number of letter blocks or character groupings and then construct a regular expression statement to handle the search in the manner you desire. FYI there is a whole forum here on the subject of regex and another for mysql.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.