MySQL Order by column = x, column asc? -
i won't paste whole query. looks this.
select *, month(date_created) month table group month order month='3', month asc
as april , querying year have expected order follows 3, 1, 2, 4.
instead out 1, 2, 4, 3.
how can change order part of statement order results selected month first rest of months in year showing sequentially?
add desc
order month = '3' desc, month asc
month='3'
boolean expression returns 1 or 0, when result zero, on last part of result.
or without using desc
, use <>
order month <> '3', month asc