Re: Date
| From: | Shafiq Rehman | Date: | Tue, 19 Jun 2007 12:30:14 +0000 |
| Subject: | Re: Date | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257391@lists.php.net to get a copy of this message | ||
Hello,
There's another way out there using mysql
SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate
but off course not a recommended way. In fact you can use it update query
(update tbl_name set expiry_date = date_add('$expiry_date', INTERVAL 7 DAY)
where user ='$user')
--
Shafiq Rehman (ZCE)
http://www.phpgurru.com | http://shafiq.pk
Cell: +92 300 423 9385
On 6/19/07, Richard Heyes <richardh@phpguru.org> wrote:
>
> Larry Garfield wrote:
> > (Note: strtotime() is probably not the fastest to execute way of doing
> it, but
> > it's the fastest to write. Choose wisely.)
>
> Is it? How about:
>
> $timestamp = strtotime($expiry_date) + (86400 * 7);
>
> --
> Richard Heyes
> 0844 801 1072
> http://www.websupportsolutions.co.uk
> Knowledge Base and HelpDesk software
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>