I am trying to count the number of times that a word appears in all the columns of a row, done an id.
+-------+------+------+------+------+------+------+
| id | pos1 | pos2 | pos3 | pos4 | pos5 | pos6 |
+-------+------+------+------+------+------+------+
| core1 | AA | BB | CC | HH | YY | var1 |
| core2 | AA | BB | var3 | TT | var2 | YY |
| core5 | AA | BB | EE | GG | YY | ZZ |
+-------+------+------+------+------+------+------+
I've tried with this code but only returns '1' and not '2' that is what I want to.
SELECT count(id) FROM customize WHERE pos1 OR pos2 OR pos3 OR pos4 OR pos5 OR pos6 LIKE 'var%' AND id = 'core2';
Any ideas of how could I do it?