Hi David,
can't give you detailed advice but I believe you look for
SELECT...GROUP BY ... ORDER BY
Please see the docs like "info mysql".
Best regards
Nils Valentin
Tokyo/Japan
\
2003年 6月 4日 水曜日 22:37、Dave Terrio さんは書きました:
> Hello - I'm a relative newcomer to development with MySQL and am
-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 9:08 AM
To: Mike Hillyer; Dave Terrio; [EMAIL PROTECTED]
Subject: Re: nested ORDER BY statements
Hi,
I am a bit new to mysql but have extensive experience with Oracle.
Does MYSQL allow a select like:
select data1
Hillyer" <[EMAIL PROTECTED]>
To: "Dave Terrio" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 4:40 PM
Subject: RE: nested ORDER BY statements
Aah, in that case I am not sure you can do what you need to do with a
single query... A UNION may
Terrio; [EMAIL PROTECTED]
Subject: RE: nested ORDER BY statements
Aah, in that case I am not sure you can do what you need to do with a
single query... A UNION may allow it.
(SELECT * FROM table1 WHERE 1=0)
UNION
(SELECT * FROM table1 ORDER BY table1.time_created DESC LIMIT 50)
ORDER BY table1
to take away
the first select and the union statement, I am not sure.
Regards,
Mike Hillyer
www.vbmysql.com
-Original Message-
From: Dave Terrio [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 8:27 AM
To: Mike Hillyer
Subject: RE: nested ORDER BY statements
Thanks for the
Hi David,
> Hello - I'm a relative newcomer to development with MySQL and am having a
> problem with ordering my query results...
This is a general SQL question. Try this:
... ORDER BY time_created DESC, name LIMIT ...
In general, you can't declare a clause twice, except for the
: nested ORDER BY statements
Hello - I'm a relative newcomer to development with MySQL and am having
a
problem with ordering my query results...
I first want to select the 50 most recently created records (with
respect to
my date field) and then order these with respect to another field (eg
Hello - I'm a relative newcomer to development with MySQL and am having a
problem with ordering my query results...
I first want to select the 50 most recently created records (with respect to
my date field) and then order these with respect to another field (eg name).
That way I'm always "orde