php - How to prefer prefix over a general "like" result? -


so let's have following columns selected when use %un% like search:

fun unlikely mundane 

but want prefixed results show first - basically, returned in following order:

unlikely fun mundan 

is there simple way in mysql, or have modify array of results after them in php?

i going on php side, although i'm not sure if there's mysql way of doing it.

you add

order left (column,2) = 'un' desc  

that put them @ top


Comments