title: How to search for multiple full and partial values in MySQL?
body: <p>I'm runnning an app running on a <code>Coldfusion8/MySQL 5.0.88</code> database.</p>
  
  <p>The app has a search form which users can use to search for product-IDs.</p>
  
  <p>Right now my SQL statement looks like this:</p>
  
  <pre><code>  ...
    AND a.product_id LIKE &lt;cfqueryparam value="%#form.s_product_id#%" cfsqltype="cf_sql_varchar"&gt;
  </code></pre>
  
  <p>Users are normally passing in a <code>single id</code>  or <code>partial id</code>, so I need this to work for both:</p>
  
  <pre><code>   123456 (full id)
     123 (partial id)
  </code></pre>
  
  <p>However, I also want to enable users to search for multiple IDs. So a user might enter:</p>
  
  <pre><code>   12345,233345,78876
  </code></pre>
  
  <p><strong>Question</strong>:<br>
  I can clear out the spaces before submitting the form, but how do I make it so my MySQL search handler correclty identifies this as a list. If I just use <code>IN</code> instead of <code>LIKE</code> I will loose the partial_ID, won't I?</p>