PDA

View Full Version : Simple MySql question...



sigepmest37
June 14th, 2006, 11:47 PM
I have a table named 'guestlist' with 3 columns:

First
Last
Date

I want to run a query which gives me all the DIFFERENT dates in the date column.

For example if my dates column contains:

6/28/06
6/28/06
6/28/06
6/29/06
6/29/06
6/30/06

I want it to only return 3 records:

6/28/06
6/29/06
6/30/06

How do i do it?


Thanks

bwh2
June 14th, 2006, 11:55 PM
SELECT DISTINCT Date FROM guestlist

stoodder
June 15th, 2006, 02:41 AM
I have a table named 'guestlist' with 3 columns:

First
Last
Date

I want to run a query which gives me all the DIFFERENT dates in the date column.

For example if my dates column contains:

6/28/06
6/28/06
6/28/06
6/29/06
6/29/06
6/30/06

I want it to only return 3 records:

6/28/06
6/29/06
6/30/06

How do i do it?


Thanksalso i woudl suggest input the fvalue of time() into the date column instead of the actual date because its easier to sort thourougha nd you can always runa query and format it in php before it is outputed