Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.