title: What is the fastest way to browse a mysql table via internet?
body: <p>Let say I have a MySQL server with one table that has over 1 million records. For the sake of illustration let say those are products. To make it simple the table has only 3 columns:</p>
  
  <p>product_id - name - price</p>
  
  <p>Let say I have one table displaying the information. Through a TextBox, with each key press, I wan't to <strong>select</strong> the products that <strong>contains</strong> the string in that TextBox, additionally the TextBox can have multiple search strings (up to 3) divided by a character '^' so if the TextBox had a string like: "st ^ b ^ ry" it would select products that <strong>contains</strong> 'st', 'b' and 'ry'.</p>
  
  <p>I made the query like this: </p>
  
  <pre><code>SELECT 
      product_id, 
      name,   
      price
  FROM 
      products
  WHERE 
      name LIKE %{Param1}%
      AND name LIKE %{Param2}%
      AND name LIKE %{Param3}%
  ORDER BY 
      name ASC
  </code></pre>
  
  <p>Locally this is fine I guess but when the program is being used somewhere else the query and table takes forever to load after each key press. So...</p>
  
  <ul>
  <li>What is the best way to do this?</li>
  <li>Is there a better way to get what i want instead of 3 "LIKE" or is it
  right how I did it?</li>
  </ul>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I've checked the questions posted by Loathing and according to what I read the best solution is:</p>
  
  <pre><code>SELECT name FROM table
  WHERE MATCH (name) AGAINST ('keyterm');
  </code></pre>
  
  <p>Having a FULLTEXT index (with MyISAM engine). But the problem with that is that it won't show partial entries. If I had a product called "1/2 Blue Strawberry" and in keyterm I have 'a' (as an example), nothing will show up. I don't want it to just look for words but every record containing whatever I want even if that is a single letter. </p>