RE: [PHP] Problem with SQL query
| From: | Mark Charette | Date: | Sun, 07 Jul 2002 17:57:09 +0000 |
| Subject: | RE: [PHP] Problem with SQL query | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105965@lists.php.net to get a copy of this message | ||
LIMIT was not included in the SQL92 SQL standards and very few vendors
implement all of SQL99; the use of ANSI standards to promote "portable"
programs has always been beset by this kind of problems.
Mark Charette
Former ANSI X3H3.1 member
-----Original Message-----
From: Alberto Serra [mailto:albertoserra@gala.net]
SELECT
extract('year', time),
extract('month', time)
count(*) as monthly_views
FROM
visitors
group by
extract('year', time),
extract('month', time)
order by
monthly_view desc
limit 1