One trick I have used in the past in other databases is to
create your own descending index. If your field is say fieldA, when
you enter a row into the table take the value of fieldA and subtract
from 0, then put that in fieldB. Index fieldB and you now can order
rows descending.
-
Hi,
Can you just
SELECT x, y, z FROM table WHERE condition ORDER BY timestamp_column
DESC;
?
-Dan
On Tue, 17 Dec 2002, Mpu Gondrong wrote:
Hello mysql,
I am currently building news portal with php and mysql, and quite
surprised knowing mysql doesn't support descending index.
Mpu Gondrong wrote:
Hello mysql,
I am currently building news portal with php and mysql, and quite
surprised knowing mysql doesn't support descending index. Why ? I
think this feature is really needed. For example I want to show the
latest news (from last updates, not always
On Tue, Dec 17, 2002 at 07:37:17AM +0700, Mpu Gondrong wrote:
Hello mysql,
I am currently building news portal with php and mysql, and quite
surprised knowing mysql doesn't support descending index. Why ? I
think this feature is really needed. For example I want to show the
Mpu Gondrong wrote:
Selasa, 17/12/2002 7:38:52, Daniel menulis:
DK What's wrong with using: order by MyIndex DESC
If I have 100 rows and mysql calculates with desc got 90 or more
(30%) rows, index won't be used. I have thousand rows, and just want
to get the last row. Without index,