title: PHP Select database rows from current month and display them with foreach()
body: <p>I am making a payment system for my website, and i need a way to select everything from a database where the month and year is identical as the current month and year. My date is formatted as dd/mm/yyy or 
  01-01-2010 for example. </p>
  
  <p>After this is done, i need to display all results with a foreach() loop. How could this be done? I've tried using the LIKE function in the mysql_query, but it just outputs an error.</p>
  
  <p>Here are some code i've come up with:</p>
  
  <pre><code>date_default_timezone_set('UTC');
  
  $today = date("d-m-Y"); // Output something like 21-10-2014 for finding matching rows
      $today_compare = substr($today, 2, 8);
  
  $fetch_donate = mysql_query("SELECT * FROM `shop_payments` WHERE date LIKE '%today_compare%");
  </code></pre>