Show the code. Probably you are omitting some quotation marks.
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254
Sounds to me like a corrupt index. I never had this problem with mysql, but such where the symptoms 20 years ago with dBase etc. with corrupt indexes. Show the output of SHOW CREATE TABLE kw and try to apply REPAIR TABLE kw
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254
As I said, show the output of SHOW CREATE TABLE ... here. And also a dump of your test data if you want us to debug this issue.
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254
I do not see anything fishy in the table set up. Provide test data. Use the mysqldump program to extract them from the database or the database export feature from phpMyAdmin.
A dump is a text output of the database content in the form of sql statements so that it can be used as input to re-create the data.
smantscheff
Nearly a Posting Virtuoso
1,233 posts since Oct 2010
Reputation Points: 300
Solved Threads: 254