Re: Dates and Mysql

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

 



This one time, at band camp, VamVan <vamseevan@xxxxxxxxx> wrote:

> I was wondering how is it possible for me to query the table to retrieve all
> the records that are one week less than the time stamp?


SELECT DATE_SUB(date_time_column, INTERVAL 1 WEEK) FROM your_table;
http://www.phpro.org/tutorials/Introduction-to-PHP-and-MySQL.html#45

Kevin

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux