On 29-Jul-2001 Mike Gifford wrote:
> Hello,
> I've got a number of press releases that I'd like to be able to order by
> year. 
> I'd like everything from this now to a year ago (ie. July 29th, 2000) to be 
> ordered together and then allow folks to scroll back to the previous year
> July 
> 30, 2000 to July 29th, 1999, etc.

Sounds like a confusing interface to me.

how about selecting by numerical year ?

if (! isset($wantyear))

SELECT ... WHERE YEAR(date)='$wantyear' ...

If you insist on now() - 1 year, look into DATE_SUB(NOW(), INTERVAL 1 YEAR)

Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to