title: SQLite select query with like condition in reverse
body: <p>I'm trying to write a query in php that will select a row from a database that partially matches a string.</p>
  
  <p>Better explained via an example:</p>
  
  <p>Say my DB has a field called <code>numberString</code>, with value 'abcd'.  I want to write a query that, given "123abcd", will return a field of that row of the database.</p>
  
  <pre><code>SELECT mood 
    FROM USERS 
   WHERE numberString like '%$giveNumberString'"
  </code></pre>
  
  <p><code>$giveNumberString</code> is the functions parameter (i.e. the string that I want to look for)</p>
  
  <p>But I think those two <code>numberString</code> and <code>'%$givenNumberString'"</code> should be like the other way around in order for the query to work as expected.  Is there a way to do this?</p>
  
  <hr>
  
  <p>Ok the table looks like this:</p>
  
  <pre><code>id | username | numberString | mood
  -------------------------------------
  1  | myUsrNam | abcd         | happy
  </code></pre>
  
  <p>Now I want, given "123abcd", to retrieve the mood of that person. In other words to match 123abcd against abcd.</p>