![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New to the CF scene Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
ORDER BY question
I need to order a list of names and in ASC order.
Problem is.. in my database i have a table for 'lastname' which I am using to ORDER BY now in ASC But some of the names dont have a last name and only have a firstname which is stored in the 'firstname' table. so they show up on the top of the list ( the ones w/o last names) Is there a way I can write it to say something like... PHP Code:
|
|
|
|
|
|
PM User | #3 |
|
New to the CF scene Join Date: Jan 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
it doesnt do it right tho..
with that putting ASC after lastname as well.. it prints out the 'firstname' on top of the 'lastname' names when it generates the list i need it all mixed in together |
|
|
|
|
|
PM User | #4 |
|
The Infractionator-inator ![]() ![]() Join Date: May 2002
Location: Marion, IA USA
Posts: 5,509
Thanks: 3
Thanked 10 Times in 10 Posts
![]() |
Why didn't you post this in the MySQL forum?
Moving to MySQL forum...
__________________
Spookster CodingForums Tyrant All Hail Spookster Where do you want to go today? Microso... errr Wrong!!! Make the switch Ubuntu Linux |
|
|
|
|
|
PM User | #5 | |
|
Master Coder ![]() ![]() Join Date: Jul 2002
Posts: 6,589
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Quote:
__________________
Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|