View Single Post

  #3 (permalink)  
Old 26-02-2008, 11:59 PM
Frodo's Avatar
Frodo Frodo is offline
Ciaran Rooney - Weeno Ltd
 
Join Date: Jan 2007
Location: London
Posts: 360
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Frodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud of
Send a message via MSN to Frodo Send a message via Skype™ to Frodo
Default

I would have done it like this but its the same thing really. I tested this code and it works (I use it), I haven't used those functions (year() and monthname() ) in MySQL before Briask are they commonly used?


Code:
SELECT DATE_FORMAT( `event-date` , '%M %Y' ) , COUNT( * )
FROM `events` WHERE `userid` = '1'
GROUP BY DATE_FORMAT( `event-date` , '%M %Y' )
ORDER BY DATE_FORMAT( `event-date` , '%M %Y' );
On a side note working these kind of things out is the best way to learn mysql I hope you had a go at it before asking here.
__________________
PHP Code:
print "CEO Weeno Ltd   - http://www.weeno.ie";
print 
"CTO Skimbit Ltd - http://skimbit.com"
skimlinks.com :: Outsource your affiliate marketing and generate revenue from your content easily.
Reply With Quote