Hi Michael,

  Using two select's we already solved the problem. The challenge is to make
the same thing using just one select. I need to know if is there an way to
get the last date or the 10th index to make the WHERE part. Like the
LAST_INDEX() function, that gets the last AUTO_INCREMENT...but I just saw
apllacation using the update command. Well, any new ideas?

Best Regards,

Felipe

-----Mensagem original-----
De: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Enviada em: quinta-feira, 5 de dezembro de 2002 21:03
Para: [EMAIL PROTECTED]
Assunto: Re: SQL Select Idea [ORDER BY]


On Thu, Dec 05, 2002 at 08:54:29PM -0200, Felipe Moreno - MAILING LISTS
wrote:
>
> Well, could you explain the behave of ORDER BY DATE,COD?

Just try it (it will order by date, then cod).

What I think you want is (as I originally said, but briefly):

create temporary table top10 select * from ... limit 10;
select * from top10 order by cod;
...

SQL
--
Michael T. Babcock
CTO, FibreSpeed Ltd.     (Hosting, Security, Consultation, Database, etc)
http://www.fibrespeed.net/~mbabcock/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to