I gave it a shot, however the table is such that only to fields exist..
- ID auto-increment
- word - a list of words basic 4-5 letter words
I did find what I think does similar query:
SELECT word
FROM dictionary
WHERE word LIKE 'mon%'
ORDER BY ABS( ORD( UPPER( SUBSTRING( word, 1, 1 ) ) ) -
ORD( UPPER( SUBSTRING( 'mon%', 1, 1 ) ) ) ) ,
ABS( ORD( UPPER( SUBSTRING( word, 2, 1 ) ) ) -
ORD( UPPER( SUBSTRING( 'mon%', 2, 1 ) ) ) ) ,
ABS( ORD( UPPER( SUBSTRING( word, 3, 1 ) ) ) -
ORD( UPPER( SUBSTRING( 'mon%', 3, 1 ) ) ) ) ,
ABS( ORD( UPPER( SUBSTRING( word, 4, 1 ) ) ) -
ORD( UPPER( SUBSTRING( 'mon%', 4, 1 ) ) ) )
LIMIT 0 , 3
Im starting to find this type of query will be un-useful
My original thoughts were to compare words with the SOUNDEX & DIFFERENCE somehow..
Anyways thanks for the efforts.