How to sort date based on Today

I need to sort my job postings from today to the past, but my date sort
basically sorts dates from January to December. How do I get the sort to
start from the today's date back

SELECT jobs.id, jobs.jobtitle, jobs.companyname, jobs.zipcodeId,
jobs.neighborhoodId, neighborhood.name, jobs.created FROM jobs, neighborhood
WHERE jobs.neighborhoodId = neighborhood.id ORDER BY created DESC

Lets say today is April 12th.

I store the dates in mysql as epoch dates (1165963600)
My sort incorrectly shows like this descending

Dec 12 - 1165963600
Aug 19
Aug 19
Jul 08
Jul 08
Jun 05
Apr 12
Apr 12
Apr 12


I want it to show like this for

Apr 12
Apr 12
Apr 12

Dec 12
Aug 19
Aug 19
Jul 08
Jul 08
Jun 05
Don Hobson [ Do, 13 April 2006 04:23 ] [ ID #1273210 ]

Re: How to sort date based on Today

Does this help? (I tend to use postgresql so now() may be something
like today() or whatever).

select case when created-now()<86400 then 1 else 0 end as priority from
jobs .... order by priority desc, created desc.
richard.a.fletcher [ Do, 20 April 2006 11:21 ] [ ID #1283371 ]

Re: How to sort date based on Today

Post removed (X-No-Archive: yes)
Notifier Deamon [ Do, 20 April 2006 19:52 ] [ ID #1283373 ]
PHP » alt.php.sql » How to sort date based on Today

Vorheriges Thema: MySql SetUp
Nächstes Thema: Phpmyadmin instalation - Cannot modify header information