Paul,

Thanks for the explanation!


Best Regards,
Viktor Vasiliou



----- Original Message ----- 
From: Paul DuBois 
To: Viktor Vasiliou ; [EMAIL PROTECTED] 
Sent: Friday, February 14, 2003 12:05 AM
Subject: Re: Re: Strange sorting in table


At 0:01 +0100 2/14/03, Viktor Vasiliou wrote:
>Ok, I guess you're right. It's just that it has never happend to me before.
>Thanks for your help.

In general, when you simply insert rows into a table, that's the order
in which they're returned.  That's just happy coincidence, and not
to be relied on.  And when you start deleting rows, you create gaps
into which subsequent rows may be inserted.  That entirely throws
off the retrieve-in-insertion-order property that you were observing.

ORDER BY's always the safest course when you need rows in order.
(Exception: MySQL's GROUP BY also sorts, so if you have a GROUP BY
and it sorts in the order you want, you don't also need an ORDER BY.

>
>
>Regards,
>Viktor


sql, query

---------------------------------------------------------------------
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