title: SQL query where() date's year is $year
body: <p>I store dates in my database in a column of <code>date</code> data type.</p>
  
  <p>Let's say I have column <code>date</code> where I store data like this "2011-01-01", "2012-01-01", "2012-02-02" etc.</p>
  
  <p>Now I need to make SQL that selects only rows where <code>date</code> is equal to <code>2012</code></p>
  
  <p><code>SELECT * FROM table WHERE date=hasSomehowYearEqualTo=2012</code></p>
  
  <p>What would be the query like?</p>