View Single Post
Old 04-22-2009, 11:25 PM   #2 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

It would appear as though the MONTH() function returns it without the preceding zero and so it would be like the following:

sql Code:
SELECT * FROM users WHERE username = 'Wildhoney' AND MONTH(date) = 3

Try setting your $get_month variable to (int) 3.

Edit: I've also noticed you've not used the AND keyword between the username and date clauses, instead you've used a comma. This will simply cause MySQL to throw an error.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
The Following User Says Thank You to Wildhoney For This Useful Post:
shankar (04-23-2009)