Re: PHP SQL Code
| From: | Tim Ward | Date: | Sun, 02 Mar 2003 08:45:25 +0000 |
| Subject: | Re: PHP SQL Code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137770@lists.php.net to get a copy of this message | ||
I'd use ...
WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(sUpdated) > 60*60*24*60
but I'm sure someone will come up with something more efficient.
Tim Ward
http://www.chessish.com
mailto:timward@chessish.com
----- Original Message -----
From: Philip J. Newman <newmanpj@philipnz.com>
To: <php-general@lists.php.net>
Sent: Sunday, March 02, 2003 7:46 AM
Subject: [PHP] PHP SQL Code
> I would like yo show the users in a list that have a date that is more
than
> 60 days old.
>
>
> $sql = "SELECT * FROM stompers WHERE sUpdated <
> from_unixtime(unix_timestamp(now())-(15760*60)) AND sActive = 'Y' ORDER BY
> sUpdated DESC";
>
> This don't quite work ..
>
> Any suggestions?
>
>
> ------
> Philip J. Newman.
> Head Developer
> info@philipnz.com
>
> +64 (9) 576 9491
> +64 021-048-3999
>
> ------
> Friends are like stars
> You can't allways see them,
> but they are always there.
>
> ------
> Websites:
>
> PhilipNZ.com - Design.
> http://www.philipnz.com/
> info@philipnz.com
>
> Philip's Domain // Internet Project.
> http://www.philipsdomain.com/
> newmanpj@philipnz.com
>
> Vital Kiwi / NEWMAN.NET.NZ.
> http://www.newman.net.nz/
> philip@newman.net.nz
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>