title: MySQL, PHP help wanted
body: <p>I am quite a beginner to MySQL. I have this simple expression which I need to filter.</p>
  
  <pre><code>$a = "2";    
  $s1 = sprintf("%s,",$a)."%";
  $s2 = "%".sprintf(",%s,",$a)."%";
  $s3 = "%".sprintf(",%s",$a);
  
  
  $res = mysql_query("SELECT busno FROM busroute WHERE route LIKE '$s1' OR route LIKE '$s2' OR route LIKE '$s3' ");
  // This basically searches for "2," OR ",2," OR ",2" in route.
  </code></pre>
  
  <p>If I use the exact same expression in MySQL browser, I get my results. But it simply returns null in PHP.
   Help! I know I am missing something, but cant figure out what. </p>