title: Force MySQL field to lowercase with PHP
body: <p>I have a database with an email field, and it cycles through the database to grab all the transactions concerning a certain email address.</p>
  
  <p>Users putting in lowercase letters when their email is stored with a couple capitals is causing it not to show their transactions.  When I modify it to match perfect case with the other emails, it works.</p>
  
  <p>How can I modify this so that it correctly compares with the email field and case doesn't matter?  Is it going to be in changing how the email gets stored?</p>
  
  <pre><code>$result = mysql_query("SELECT * FROM `example_orders` WHERE `buyer_email`='$useremail';") or die(mysql_error());
  </code></pre>
  
  <p>Thanks ahead of time!</p>