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.
Wow! There's actually an SQL99 that vendors are targeting, kinda sorta?
Hey, with any luck, but
ðÒÉ×ÅÔ!
I can't figure out what is wrong with this:
$query = select count(*) as monthly_views from visitors group by
extract('year', time), extract('month', time) order by monthly_view desc
limit 1;
AFAIK this is no ANSI SQL, which is why is not portable. Your query
should really be
ðÒÉ×ÅÔ!
I forgot to add:
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
I take it that you have a *monthly_view* column in your
Thanks for giving me something to look up :)
--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com
Alberto Serra [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
ðÒÉ×ÅÔ!
I forgot to add:
SELECT
extract('year', time),
extract('month', time),
count(*)
No matter what I try I still seem to get the error message.
The coloumn that contains the dates has unix timestamps. I think this is why
it is not working.
I will research it further.
If you can be of any help please tell me.
--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com
Alberto Serra
I have fixed it now don't worry!
--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com
Alberto Serra [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
ðÒÉ×ÅÔ!
I forgot to add:
SELECT
extract('year', time),
extract('month', time),
count(*) as
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
ðÒÉ×ÅÔ!
Mark Charette wrote:
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.
Yes, and vendors just love to have proprietary standards to
8 matches
Mail list logo