Reputation:
I am grouping together words from a mysql column and counting the number of appearances. This is working fine except that sometimes it lists a word count of 1 when the table column is actually empty. I am assuming that this must just be a space or something in the column.
I have tried trim to remove the space but it cleans up the space with the other words but still returns a value of one and an empty field.
Is trim the correct method?
Thanks
Lee
Upvotes: 0
Views: 134
Reputation:
Whats your MySQL code? You could tell your query not to look for the empty fields.
SELECT * FROM table
WHERE field != ''
OR field IS NOT NULL
Upvotes: 1