From: "Michael Hill" <[EMAIL PROTECTED]>
> I have a bunch of news items in a database. All of them have a date > associated with them. I am trying to make a function that queries the db > and tells me which months have newsitems in them(if any at all), and how > many each of the months have. You should mention what database you're using when you ask questions like this. Try: SELECT MONTH(date_column), COUNT(*) FROM table GROUP BY MONTH(date_column); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php