title: How do I select all rows in a MySQL column
body: <p>This seems to be an easy question but I can't for the life of me find an answer. How do I select all rows in a column regardless of value? For instance if I want everything in the column location:</p>
  
  <pre><code>"SELECT * FROM whateverTable WHERE id='$id' AND date='$date' AND location='I don't care, return everything'"
  </code></pre>
  
  <p>Keep in mind that I need location in there because I'm getting a dynamic URL query to this database, otherwise I would have just left it out. </p>
  
  <p><em><strong>Edit</em></strong>
  I've read some of the answers and shame on me for not making myself clearer. I'm trying to see if a MySQL query where you can select every row in a column is possible without the need for this:</p>
  
  <pre><code>if ($location == '') {
    "SELECT * FROM whateverTable WHERE id='$id' AND date='$date'"
  } else {
    "SELECT * FROM whateverTable WHERE id='$id' AND date='$date' AND location='$location'"
  }
  </code></pre>
  
  <p>Rather than hacking up my code like that (because I have a hell of alot more query clauses in my real code), I'm trying to see if something like this is possible :</p>
  
  <pre><code>"SELECT * FROM whateverTable WHERE id='$id' AND date='$date' AND location='%'"
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>"SELECT * FROM whateverTable WHERE id='$id' AND date='$date' AND location='.*'"
  </code></pre>
  
  <p>But I'm not having any luck. If it's not, I'll just move on. Sorry for not making myself clearer</p>