database - Counting the number of rows that have a particular word in a column of blob data type in mysql -
database - Counting the number of rows that have a particular word in a column of blob data type in mysql -
i have table in mysql. datatype of column 'file' blob. need count number of rows have word 'lumia' in column 'file' , 'display' in column 'attribute'. is, here rows 1 , 3. output has 2. how can in mysql?
the multiple occurrence of word lumia in 3rd row need not counted twice.
+------+----------------------------+------------+ | slno | file | attribute | +------+----------------------------+------------+ | 1 | 5inch 8mp lumia snapdragon | display | | | 2 | 8mp galaxy samsung android | photographic camera | | | 3 | nokia lumia reddish lumia | display | | | 4 | black samsung 8mp android | photographic camera | | | 5 | lumia windows 8mp reddish | model |
in add-on stated in how count number of occurrence of particular word in mysql blob text?
if need sum seek this
select sum(if(locate(@searchthis, file),1,0)) count_sum `documents`;
excluding sum()
results below stated in status "the multiple occurrence of word lumia in 3rd row need not counted twice"
mysql database string text blob
Comments
Post a Comment