title: How to do a SELECT LIKE with PDO Prepare Statement - are value objects of any use here?
body: <p><em>The point is to make a query that will grab values introduced by the user on a input box, and retrieve the database records found trough that keyword comparison.</em></p>
  
  <p>On a innodb engine, so no MATCH AGAINST available correct ?
  I will use <strong>LIKE</strong> on a indexed column table, hope it's ok.</p>
  
  <p>traditionally we will do:</p>
  
  <pre><code>SELECT our_column FROM our_db_table WHERE our_column LIKE '%$queryString%';
  </code></pre>
  
  <p>So if our query string is AB we will retrieve both: "lab" and "abnormal" precise?</p>
  
  <p>1)
  <strong>How can we achieve this but, by using PDO ?</strong></p>
  
  <hr>
  
  <p>Thinking:</p>
  
  <p>Something like,</p>
  
  <pre><code>$stmt = $this-&gt;_dbh-&gt;prepare("SELECT d.our_column FROM our_db_table d WHERE d.our_column LIKE ?");
  </code></pre>
  
  <p>But what's next?</p>
  
  <p>Normally I would do:</p>
  
  <pre><code>$stmt-&gt;bindParam(1, $ourTableVo-&gt;getOurColumn(), PDO::PARAM_STR, 255);
  $stmt-&gt;execute();
  $result = $stmt-&gt;fetch(PDO::FETCH_OBJ);
  </code></pre>
  
  <p>2)
  <strong>Could a VO be of any use on this case?</strong> </p>
  
  <p>Thanks a lot in advance!</p>