title: MySQL find last digit in colums using string function
body: <p>I have to list all the details of a table where the colums event_id and horse_id end in a "1". I have achieved this by doing the following:</p>
  
  <pre><code>SELECT * FROM event 
  WHERE event_id AND show_id LIKE '%1'
  </code></pre>
  
  <p>However the question specifies the use of a string function. The only string i can find that would be useful in this case is RIGHT(). I can't get this to perform as i wish though.</p>
  
  <pre><code>SELECT * FROM event
  WHERE RIGHT('1',1) 
  </code></pre>
  
  <p>Displays all columns that end in a one. However i need to limit the search to event_id and horse_id.</p>
  
  <pre><code>SELECT * FROM event
  WHERE event_id AND show_id RIGHT('1',1) 
  </code></pre>
  
  <p>Doesn't work. The "right" string is invalid.</p>
  
  <p>Any help appreciated.</p>