title: Count MySQL rows in PHP for current month
body: <p>I want to display the number of orders of current month and I don't know the query to do it:</p>
  
  <p>This is the code:</p>
  
  <pre><code>$stats_orders_curr = mysql_query(
                       'SELECT count(1) FROM orders 
                        WHERE MONTH = MONTH(CURDATE()) 
                        AND YEAR = YEAR(CURDATE())'
  );
  
  $orders_curr =  mysql_fetch_array($stats_orders_curr);
  $orderscurr = $orders_curr[0];
  </code></pre>