Reply to Re: Unixtime SQL help!!!!

Your name:

Reply:


Posted by J.O. Aho on 11/23/05 08:41

lane.dj@gmail.com wrote:
> I'am having a problem with an SQL statement...
>
> The Time column is populated using a php time() function.
>
> How do I use the TIME column to give me only the last 7 days worth of
> data. Not sure how to manipulate unixtime formats... any help would be
> appreciated..

A week is 604800 seconds, so you need to get the current time and then reduce
that with 604800 seconds or you can use the mktime to create a the time for
midnight of today, so that you can get all of entries a week ago.

mktime(0,0,0,date('n'),date('j'))



//Aho

[Back to original 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

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