Saleh
Saleh

Reputation: 2719

How to get a list of unrepeatable date from my db in PHP?

in my db there are 5 fields (id, list_date, amount, total, m_from)

and contain data, for example :

1 - 1/1/2010 - 10 - 50 - 'example111'

1 - 1/1/2010 - 10 - 50 - 'example111'

1 - 1/4/2010 - 10 - 50 - 'example154

1 - 1/1/2010 - 10 - 50 - 'example111'

1 - 1/5/2010 - 10 - 50 - 'test'

I need to know how I can get dates from list_date but without repeatable dates like '1/1/2010, 1/5/2010, 1/4/2010'

Thanks in Advance.

Upvotes: 3

Views: 93

Answers (2)

siannone
siannone

Reputation: 6763

If i'm not mistaken you can use also GROUP BY:

SELECT list_date FROM table GROUP BY list_date

Upvotes: 0

Matteo Riva
Matteo Riva

Reputation: 25060

SELECT DISTINCT list_date FROM table

Upvotes: 3

Related Questions