Re: newbie: how to return one iteration *per unique date (DAY!)* in a timestamp column?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 2, 2009 at 11:13 PM, Govinda<govinda.webdnatalk@xxxxxxxxx> wrote:
>>
>> What does the resultset look like?
>
> I am getting every record in the table back

my bad, i reversed the mysql and php date function formats

try

SELECT distinct(
DATE_FORMAT( fieldname, '%Y-%m-%d' )
)
FROM table
ORDER BY field DESC


-- 

Bastien

Cat, the other other white meat

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux