|MONTH(date)|
   Returns the month for |date|, in the range |1| to |12|:

SELECT * FROM employees WHERE MONTH(hiredate)='$month'




Hunter, Jess wrote:


I have a field named "hiredate" and it is in the typical MySQL format
(YYYY-MM-DD) what I am trying to do it be able to create a query that when I
put in a particular month it will give me the results regardless of the year
the person was hired.  This is so I can generate a "anniversary" report to
include the names of all the people who were hired in a particular month.

Any snippet of code would be helpful.

Thanks in advance

Jess





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to