How can I count the number of occurrences of a string across multiple attributes (in my current case, I have 5 attributes) of a table in a MySQL database? Can I do so using MySQL quer(y/ies)?
The attributes may have NULL values, if that means anything while counting.
Also, I am using PHP on the client-side which I could use if MySQL wouldn't be the better way to find this count, though I want to know how this can be done with MySQL.
I saw this post, and it's similar to what I want to do, but this solution only works for counting strings over one attribute/column. I need to count the total occurrences of each string over all (e.g.: 5) of my attributes/columns.
id, attribute.