Re: [PHP] Query question
- From: edlazor@xxxxxxxxx (Ed Lazor)
- Date: Sat, 28 Oct 2006 19:22:21 -0700
Use the mysql list :)
On Oct 28, 2006, at 3:01 PM, Beauford wrote:
Hi,.
I have a MySQL database with a date field and a bunch of other fields. The
date field is in the format - 01/01/2006. What I want to do is query the
database and create a table that shows just the year and how many instances
of the year there is. I have been taxing my brain for a simple solution, but
just not getting it. Any suggestions?
Thanks
Example output.
Year Count
2002 5
2003 8
2004 9
2005 15
2006 22
ps - I get this information sent to me and I can't change any of the data. I
just enter it in the db and then hopefully do the query on it.
- Follow-Ups:
- Re: [PHP] Query question
- From: "Joe Wollard"
- Re: [PHP] Query question
- References:
- Query question
- From: "Beauford"
- Query question
- Prev by Date: Re: [PHP] A general UL script
- Next by Date: Re: [PHP] Query question
- Previous by thread: Query question
- Next by thread: Re: [PHP] Query question
- Index(es):
Relevant Pages
|