View Single Post
Old 10-24-2007, 11:05 AM   #1 (permalink)
meshi
The Contributor
Upcoming Programmer 
 
meshi's Avatar
 
Join Date: Oct 2007
Posts: 44
Thanks: 0
meshi is on a distinguished road
Default how to sort this????

$sql="select * from my table order by lastname LIMIT 0,5"

if i have this display
lastname
a
b
c
d
e

and i have a data in my table
a b c d e f g h i j k l m n o p

i want to sort only the abcde by desc.what would i do?

what i did is this one
$sql="select * from my table order by lastname sort desc LIMIT 0,5"
this query displays thisponml
i want my display would be edcba
meshi is offline  
Reply With Quote