MySQL Forums
Forum List  »  Newbie

Reversing the output of a query
Posted by: Fabrizio Bartolomucci
Date: June 07, 2024 01:47AM

Hullo,
I'm trying to reverse the output of a query in order to present results in ascending order by using query:


SELECT *, ( 3959 * acos ( cos ( radians(38.764104) ) * cos( radians(latitude ) ) * cos( radians(longitude ) - radians(16.199104) ) + sin ( radians(38.764104) ) * sin( radians(latitude ) ) ) ) AS distance FROM banner HAVING distance < 0.3 ORDER BY 'index' ASC

Yet they always come in reverse order and nothing changes if I put DESC at the end.

What is wrong with my code?

Thanks, Fabrizio

Options: ReplyQuote


Subject
Written By
Posted
Reversing the output of a query
June 07, 2024 01:47AM
September 09, 2024 10:58AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.