title: how to use like on a long string value in mysql
body: <p>I'm trying to use LIKE statement in mysql </p>
  
  <p>the values I'm trying to search are</p>
  
  <p>ex:</p>
  
  <pre><code>(999) 999-9999
  (999) 888-8888
  (888) 888-8888
  (888) 999-9999
  </code></pre>
  
  <p>when I'm trying to search for </p>
  
  <p><code>(888) or (999)</code> </p>
  
  <p>it shows up just fine, but when I'm searching for</p>
  
  <pre><code>999-9999 or 888-8888
  </code></pre>
  
  <p>the values won't show</p>
  
  <p>php script for database:</p>
  
  <pre><code>if($area != "" &amp; $phone != ""){
  
           $phone = $area.' '.$phone;
           $s_phone = " AND pros_num ='$phone'";
  
  }else if($area == "" &amp; $phone != "")
  
           $s_phone = " AND pros_num LIKE '$phone%'";
  else
  
           $s_phone = " AND pros_num LIKE '$area%'";
  </code></pre>