Database entries
table test
name
========================
Sunae Kasimov
Obsop Natty
Preem Kuman
Mysql query
select *
from test
where name like 'na%' or
name like '% na%' or
name like '%na%';
return in order
1 and then 2
but i wanted in order 2 and 1. That is want to give more weight to ‘% na%’ then ‘%na%’
Any way this can be done in mysql?
1 Answer