title: Matching a value to multiple columns (in one statement) from a table using MySQL
body: <p>I'm working with a table in MySQL that contains the following columns:</p>
  
  <pre><code>id, january, february, march, april, etc
  </code></pre>
  
  <p>The data in the table looks like this:</p>
  
  <pre><code>aa, 0, 0, 1, 0
  ab, 1, 0, 1, 0
  ac, 1, 1, 0, 0
  ad, 1, 1, 1, 0
  </code></pre>
  
  <p>To query it, I could easily do this:</p>
  
  <pre><code>select * from table where january = 1 and february = 1
  </code></pre>
  
  <p>The result would be:</p>
  
  <pre><code>ac, 1, 1, 0, 0
  ad, 1, 1, 1, 0
  </code></pre>
  
  <p>I want to know if there's a way to do it like this:</p>
  
  <pre><code>select * from table where table.columns = 1
  </code></pre>
  
  <p>I want to use table columns in expression without actually specifying the names manually (typing them out).</p>
  
  <p><strong>Bonus (+1) question</strong>:<br>
  Could it be done using Match/Against like this:</p>
  
  <pre><code>select * from table
  where
  (
      match (somehow,get,the,table,columns,I,need,here)
      against (1 in boolean mode)
  )
  </code></pre>
  
  <p>Thanks for your time! :)</p>