title: PHP Search MySQL Database Framework
body: <p>I'm sure this question has been asked at least 1000 times, but please hear me out.</p>
  
  <p>I have written a PHP script for MySQL which is used to search through books which are for sale on my book exchange site. I used <a href="http://devzone.zend.com/26/using-mysql-full-text-searching/" rel="nofollow">this tutorial</a> to help me write a FULLTEXT search script, and it works great, for the most part. There are two real big issues that have me and some of my users cringing:</p>
  
  <ol>
  <li>If I search for a particular merchant by name, say, <code>Steve Miller</code> the script will return all people with the name of <code>Steve Miller</code>, first name of <code>Steve</code>, and last name of <code>Miller</code>. As you can imagine, the script returns quite a few bogus results. It gets even worse with common words in book titles, such as <code>of</code> or <code>the</code>, but it doesn't return all books containing these words.</li>
  <li>I have an auto-suggest feature which can only suggest titles when you have entered entire words. For example searching for <code>The Unive</code> can't suggest anything, while <code>The Universe</code> can suggest <code>The Universe Next Door</code>.</li>
  </ol>
  
  <p><strong>Question:</strong> Are there any well established scripts or frameworks which allow me to search withing multiple relations in a MySQL database? I can't use something like Google Custom Search, since I am searching though particular relations and foreign key relationships in a database, not the whole site.</p>
  
  <p>Thank you for your time.</p>