agent_smit
Постоялец
- Регистрация
- 12 Дек 2008
- Сообщения
- 60
- Реакции
- 11
Это можно сделать через union:
или так (лучший вариант
PHP:
(select * from Table_Name where Zagolovok = 'Мука')
union distinct
(select * from Table_Name order by Zagolovok );
или так (лучший вариант
PHP:
(select Zagolovok, cast(1 as SIGNED) order_field from Table_Name where Zagolovok = 'Мука')
union distinct
(select Zagolovok, cast(0 as SIGNED) order_field from Table_Name)
order by order_field desc,Zagolovok;