Select Dates and then select news with that dates

2004-05-17 Thread T. H. Grejc
Here is what I'm trying to achieve: *10.04.2004.* - news 1 - news 2 - news 3 *14.04.2004.* - news 4 *15.04.2004.* - news 5 What method will be the best. Do I have to use two queries. One to select (5) last dates, and then loop throug that results and select news. select dates while (dates) select

Re: Select distinct year from unix timestamp

2004-05-16 Thread T. H. Grejc
John Fawcett wrote: From: "T. H. Grejc" How can I add more fields to query. If I write: SELECT DISTINCT FROM_UNIXTIME(created, '%Y %M'), other_field FROM table_name ORDER BY created DESC I loose distinction (all dates are displayed). TNX I don't think distinction is lost.

Re: Select distinct year from unix timestamp

2004-05-16 Thread T. H. Grejc
Paul DuBois wrote: At 22:27 +0200 5/16/04, John Fawcett wrote: From: "T. H. Grejc" Hello, I'm trying to select all distinct years from a unixtimestamp field in MySQL database (3.23.56). I have a query: SELECT DISTINCT YEAR(date_field) As theYear FROM table but PHP gives me

Re: Select distinct year from unix timestamp

2004-05-16 Thread T. H. Grejc
John Fawcett wrote: From: "T. H. Grejc" Hello, I'm trying to select all distinct years from a unixtimestamp field in MySQL database (3.23.56). I have a query: SELECT DISTINCT YEAR(date_field) As theYear FROM table but PHP gives me an empty array. What am I doing wrong? TNX I thin

Select distinct year from unix timestamp

2004-05-16 Thread T. H. Grejc
Hello, I'm trying to select all distinct years from a unixtimestamp field in MySQL database (3.23.56). I have a query: SELECT DISTINCT YEAR(date_field) As theYear FROM table but PHP gives me an empty array. What am I doing wrong? TNX -- MySQL General Mailing List For list archives: http://lists.my