Re: most occured word - but without search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually, the issue is we don't have any parameters like "John" in variable
that could be used to find "John" from the record.

So the following solution wont work in our case.

1.
 - - - - - - - - - -
select count(*) from table_name where person_name like 'John%' -- you can
use %John% too

 - - - - - - - - - -

2. The query below is good but it only searches multiple occurrence of a
word, only if the keyword is exactly the same e.g. John. But if the value in
the some other row in the field is "John Lucky", then it wont count this and
still shows that there are 1,1 individual occurences with "John" and "John
Lucky"...

The need is to read both "John" and "John Lucky" and query should show it 2
occurrences. Any idea...?



SELECT search_keyword, COUNT(search_keyword) AS name_count
FROM stats_search
GROUP BY search_keyword

Thanks v.much


[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux