Is it possible in MYSQL to do a partial match but the opposite way round to how this is normally done..
I.E I have a website for checking.... voucher codes
A user types "WUD092050549E" and hits search
I want the database to return... any row with column_x matching
"WUD092050549E" - exact match
"WUD0920" - 7 character match
"WUD0" - 4 character match
BUT NOT
"WUD039540" - 4 character match, then incorrect
"123213WUD092050549E2334" - incorrect characters, then match
Essentially where the row matches 4 or more characters (in the same sequence) with no mistakes
I know exact matches can be achieved by.. "SELECT * WHERE column_x="WUD092050549E"
For myself I ideally want to sort exact matches, then if none were found other less accurate matches (so two queries possibly)