I've got a list of suppliers that I want to order by region.
However, the supplier address is made up of 2 fields, "address1" and "address2".
It is possible for end-users to fill in only "address1", or both fields.
If they only enter "address1", the contents of that field is displayed in bold on the page, i.e.:
Staffordshire
If they enter both fields, only address2 is bold:
Cannock, Staffordshire
The list needs to be sorted by the bold bit, and this is where my problem appears.
I need to order the bold bits in alphabetical order, but because they are spread over two columns this doesn't seem easy.
Is there a way of doing it in just one SQL query or am I going to have to do extra processing in PHP?