| | |
MySQL to search for spelling mistakes in rows, columns?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2009
Posts: 521
Reputation:
Solved Threads: 61
0
#2 22 Days Ago
you can search for any ready made spell checked available else where.
You won't be able to do it alone with php unless you have a huge database of the words, against which you can check your spellings.
You won't be able to do it alone with php unless you have a huge database of the words, against which you can check your spellings.
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
0
#3 22 Days Ago
Yea, whatever you do, you will need a list of correctly spelled words to test against. PHP has no way to determine what is and is not incorrectly spelled unless it has something to compare it to.
Once you have that list, however, PHP has a few functions you can use to "guess" the correct word. Like the levenshtein function. (See the example there)
Once you have that list, however, PHP has a few functions you can use to "guess" the correct word. Like the levenshtein function. (See the example there)
Last edited by Atli; 22 Days Ago at 4:19 am. Reason: Clarifying.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
And use [code] tags!
•
•
Join Date: Nov 2009
Posts: 7
Reputation:
Solved Threads: 0
0
#4 22 Days Ago
I have massive database of spelling words, dictionaries and grammar queries..
Is there no match like and replace type thing I can do?
If search.php action is..
$get request [q]
sql = select * all from products where q="request query form q" and match with spellinglist where word is like "request query form q" and like "spellinglist" suggestion
Is there no match like and replace type thing I can do?
If search.php action is..
$get request [q]
sql = select * all from products where q="request query form q" and match with spellinglist where word is like "request query form q" and like "spellinglist" suggestion
•
•
Join Date: Sep 2009
Posts: 521
Reputation:
Solved Threads: 61
0
#5 22 Days Ago
yes, you got it right. But if the spelling is wrong , say the user is searching for "camel"
and he types "camal: then your code need to do this too.
query should include...."..like '%cam[single char]l' " etc
or "..like '%cam%' " etc.
In short you will need to experiment with the wild cards little bit
and he types "camal: then your code need to do this too.
query should include...."..like '%cam[single char]l' " etc
or "..like '%cam%' " etc.
In short you will need to experiment with the wild cards little bit
"The discipline of writing something down is the first step towards making it happen."
follow me on twitter
follow me on twitter
0
#9 22 Days Ago
Like some mentioned, you'll need to decide on your options.
Also you'll need to ensure that punctuation marks are not included
in your words to check. It's possible that some words will have numbers in them (e.g. chemicals), so you may want to include words that have numbers in them, but not numbers by themselves.
If you get a 'nomatch', you'll then need to trawl for a series of wildcarded options and list them alphabetically.
You could use an autosuggest (ajax) list, although a MASSIVE db may slow down this function.
Also you'll need to ensure that punctuation marks are not included
in your words to check. It's possible that some words will have numbers in them (e.g. chemicals), so you may want to include words that have numbers in them, but not numbers by themselves.
If you get a 'nomatch', you'll then need to trawl for a series of wildcarded options and list them alphabetically.
You could use an autosuggest (ajax) list, although a MASSIVE db may slow down this function.
"...the woods would be a very silent place if no birds sang except for the best"
All opinions count.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
All opinions count.
F'enw i yw Mr. Blaidd. Byddwch yn ofalus - dwi'n cnoi.
![]() |
Similar Threads
- Rows and Columns (C++)
- php/mysql search display (PHP)
- Rank mysql search results by coulmn weighting (PHP)
- MySQL Search - Google like? (PHP)
- mysql search help (MySQL)
- How to convert rows into columns (MySQL)
- convert rows to columns (VB.NET)
- table rows and columns (PHP)
- it's simple but yet complicated...php and mysql search.. (PHP)
- Spelling mistakes in keywords (Search Engine Optimization)
Other Threads in the PHP Forum
- Previous Thread: Static Content + Paging
- Next Thread: using variable substitutions in conditional statements
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube





