Scroll to top

How to sorting in descending and ascending in sql?

Sorting in descending order in SQL

Descending

“select * from $dealtable where user_id=’$uid’ AND status=’$status’ ORDER BY ID DESC”

Ascending

“select * from $dealtable where user_id=’$uid’ AND status=’$status’ ORDER BY ID ASC”

Leave a Reply

Your email address will not be published. Required fields are marked *