title: Mysql returning empty set when data is there
body: <p>I have a simple locations table with the columns: <code>location_id, country, state, city</code>.</p>
  
  <p>I populated the table with data and ran the following query:</p>
  
  <pre><code>SELECT location_id 
  FROM locations 
  WHERE country="United States" 
  AND state="Louisiana" 
  AND city="New Orleans";
  </code></pre>
  
  <p>MySQL returns an empty set even though the data is there. I've isolated it to the city column. If I leave off the city condition in the WHERE clause everything is fine. If I ask for the city in the SELECT clause but not in the WHERE clause everything is fine. What could be the problem? This query seems too simple to be causing trouble.</p>
  
  <p>Could white space in the city column be causing this?</p>
  
  <p>UPDATE! UPDATE!</p>
  
  <p>THANKS EVERYONE - I SOLVED THE PROBLEM.
  I entered the city column data from text files with each city name being on a line by itself. This got me wondering about the newline character. I ran the query (SELECT location_id FROM locations WHERE state="Louisiana" AND city="New Orleans\n"). Worked like a charm.</p>
  
  <p>I cleaned all the newlines out of the column by running this query:
  UPDATE <code>locations</code> SET <code>city</code> = REPLACE(REPLACE(<code>city</code>, '\r', ''), '\n', '');</p>
  
  <p>Everything works fine and I learned a trick about using text files to populate a database.</p>
  
  <p>Thanks everyone for trying to help me solve this weird problem.</p>