title: mySQL: use LIKE with SUBSTR in a query?
body: <p>How can I do something like this:</p>
  
  <pre><code>SELECT * FROM .... WHERE wp_users.user_email LIKE '%SUBSTR(wp_callbacks.post_data, INSTR(wp_callbacks.post_data, 'payer_email')+19, 20)%'... 
  </code></pre>
  
  <p>What I am trying to do is query a wp_callbacks table (that stores it in the format like s:11:"payer_email";s:18:"some.email@gmail.com" ...) and see if the actual email from wp_users matches that email from wp_callbacks table.</p>
  
  <p>The problem is that I don't know how long the email itself is so I picked a random value (20) in SUBSTR call to grab the first 20 characters of the email itself and then I want to check if the user_email is LIKE '%...%' that value.</p>
  
  <p>Ideas?</p>