You are here: Order mixed columns? « PHP Programming Language « IT news, forums, messages
Order mixed columns?

Posted by frizzle on 09/26/88 11:30

Hi all,

I have a MySQL-table. 2 fields.
Field 1 -> Name
Field 2 -> Nick

Now i want to order them alphabetically by Nick,
BUT if Nick is empty it has to pick Name.
How can i mix both of them ?
(example below)

Thanks!

Greetings Frizzle.

-- example --
unordered:
Name | Nick
John | JohnnyBoy
Dean |
George | Jaws
Chris | Ape

result:
Ape
Dean
Jaws
Johnnyboy

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация