PHP MYSQL Word Search Code Needed

Job ID: 34124305

Budget: $30 – $250 USD

I have a MYSQL database of 280,000 English words (I attach the CSV file to this project) that I wish to search with simple PHP / MYSQL search from an html input box. The database table comes with 6 columns: 1. id, 2. word, 3. alfa (alphabetically sorted letters of the word), 4. definition of the word, 5. scrabble points for the word, 6. words with friends (wwf) points for the word. Again, the database is attached as a CSV file.

I need to be able to enter a number of letters (e.g. AGHEACOP or AMPOTE or AABDOR) into a simple input search box and then extract the following:

1. Any perfect anagram formed with all of the letters, e.g. AABDOR = ABOARD
2. The longest words that can be formed with these letters that are less than an Anagram, e.g. AABDOR => gives a 5 letter word BOARD, 4 letter words DRAB and BARD, a 3 letter word BAD etc..
3. The single word that scores the highest based on the "Scrabble" score column
4. The single word that scores the highest based on the "Words with friends" score column

Important: I also need to be able to support two(!) wildcard characters in the search. For example I could enter two questionmarks in the search string, and they would act as wildcards during the search. E.g. "A?OA?D" would search with AADO and then two wildcards that can be any letter.

I hope this is clear. Feel free to ask to clarify.
Related categories: PHP MySQL HTML Database Programming