0

Hi friends!
i have a drop down combo box which holds names of persons with php mysql order by asc query
like a's name put in 1st and after b's and c's and in last it shows z's name
now i want that if it will show tahir name in top and after that it will show all other name in asc order, is it possible?
like this
1.tahir
2.amir
3,ahmed
4.akram
5,aslam
6,bilal
7.charlie
8.zahid

i hope you got my point.
here is the query
$query = "SELECT * FROM person ORDER BY fullname ASC";

Edited by tahirkhanafridi: query subimition

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by pritaeas
0
SELECT * FROM person WHERE fullname = 'tahir' LIMIT 1
UNION
SELECT * FROM person where fullname <> 'tahir' ORDER BY fullname ASC
0

pritaeas thanks for your reply but its not working , its showing me the result as previous still i can see on top old results like ascending one's

//$query = "SELECT * FROM person ORDER BY fullname ASC";
                        $query = "SELECT * FROM person WHERE fullname = 'Mohammad Ismail Shaikh' LIMIT 1
                        UNION
                        SELECT * FROM person WHERE fullname <> 'Mohammad Ismail Shaikh' ORDER BY fullname ASC";
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.