You are here: Re: current_date()-1 misbehaving on first day of month « PHP Programming Language « IT news, forums, messages
Re: current_date()-1 misbehaving on first day of month

Posted by Peter van Schie on 11/03/05 01:07

toedipper wrote:

> I have the following select statement whch gives me a count for
> downloads for previous day.
>
> SELECT
> COUNT(swid)
> FROM
> downloads
> WHERE
> date = current_date()-1

Hi toedipper,

I think you're looking for something like this instead:

SELECT CURRENT_DATE() - INTERVAL 1 DAY;

HTH.
Peter.
--
http://www.phpforums.nl

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация