Forum Moderators: coopster & phranque

Message Too Old, No Replies

Getting MySQL records

for a specific month

         

lorax

4:52 pm on Nov 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have MySQL db using the DateTime field type. I have a PHP event calendar that returns all events from today onward (limited to 5 at a time). I want to use a pull down that will allow users to jump to any month in the future and get the events for that month. I can't seem to find a way to write a WHERE clause that will allow me to return only those records that match the month I'm looking for. So I'm wondering what your suggestions would be to handle this.

lorax

5:19 pm on Nov 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Never mind I figured it out:

WHERE month(col_name) = 5