<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Count number of words in a MySQL column</title>
	<atom:link href="http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/</link>
	<description>Bits and pieces of linux, mysql, apache, php</description>
	<lastBuildDate>Fri, 16 Jul 2010 19:43:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Imane</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-11509</link>
		<dc:creator>Imane</dc:creator>
		<pubDate>Fri, 22 Jan 2010 18:39:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-11509</guid>
		<description>GREAT tip, i am trying to use this select statement to show all the words and sort them by number of occurence (how many times that occur).  Any help on this would be GREATLY appreciated. 

Thanks again</description>
		<content:encoded><![CDATA[<p>GREAT tip, i am trying to use this select statement to show all the words and sort them by number of occurence (how many times that occur).  Any help on this would be GREATLY appreciated. </p>
<p>Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krisna</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-11186</link>
		<dc:creator>Krisna</dc:creator>
		<pubDate>Mon, 11 Jan 2010 13:09:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-11186</guid>
		<description>@cormac : did you mean counting a certain word each row? if that&#039;s your mean try to read &lt;a href=&quot;http://imkrisna.webatu.com/2010/01/mysql-counting-number-of-word-on-each-row/&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>@cormac : did you mean counting a certain word each row? if that&#8217;s your mean try to read <a href="http://imkrisna.webatu.com/2010/01/mysql-counting-number-of-word-on-each-row/" rel="nofollow">this</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cormac</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-8553</link>
		<dc:creator>cormac</dc:creator>
		<pubDate>Thu, 20 Aug 2009 20:53:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-8553</guid>
		<description>Has anyony managed an SQL query that will county the freuquency of words in column of a table?</description>
		<content:encoded><![CDATA[<p>Has anyony managed an SQL query that will county the freuquency of words in column of a table?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-6167</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Fri, 22 May 2009 05:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-6167</guid>
		<description>That&#039;s bloody awesome - very nice thinking outside of the box. Works a treat! Many thanks saves me bring everything in and doing it with php!</description>
		<content:encoded><![CDATA[<p>That&#8217;s bloody awesome &#8211; very nice thinking outside of the box. Works a treat! Many thanks saves me bring everything in and doing it with php!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajay Arjunan</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-6069</link>
		<dc:creator>Ajay Arjunan</dc:creator>
		<pubDate>Tue, 12 May 2009 11:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-6069</guid>
		<description>Great !!! Thanks for this query.</description>
		<content:encoded><![CDATA[<p>Great !!! Thanks for this query.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BL</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-6005</link>
		<dc:creator>BL</dc:creator>
		<pubDate>Mon, 04 May 2009 11:31:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-6005</guid>
		<description>The real solution is to replace double or more spaces in the first LENGTH():

SELECT SUM( LENGTH(REPLACE(REPLACE(name,&#039;   &#039;,&#039; &#039;),&#039;  &#039;,&#039; &#039;)) - LENGTH(REPLACE(name, &#039; &#039;, &#039;&#039;))+1)
FROM table;

Replacing double or more spaces in the second LENGTH() won&#039;t modify the result, because it has the same effect as the first solution has: all spaces are removed from text.</description>
		<content:encoded><![CDATA[<p>The real solution is to replace double or more spaces in the first LENGTH():</p>
<p>SELECT SUM( LENGTH(REPLACE(REPLACE(name,&#8217;   &#8216;,&#8217; &#8216;),&#8217;  &#8216;,&#8217; &#8216;)) &#8211; LENGTH(REPLACE(name, &#8216; &#8216;, &#8221;))+1)<br />
FROM table;</p>
<p>Replacing double or more spaces in the second LENGTH() won&#8217;t modify the result, because it has the same effect as the first solution has: all spaces are removed from text.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Knut Urdalen</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-5621</link>
		<dc:creator>Knut Urdalen</dc:creator>
		<pubDate>Fri, 24 Apr 2009 07:03:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-5621</guid>
		<description>Very nice Wasif :) It saved my day! Thanks!</description>
		<content:encoded><![CDATA[<p>Very nice Wasif <img src='http://www.mwasif.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It saved my day! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wasif</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-2593</link>
		<dc:creator>Wasif</dc:creator>
		<pubDate>Wed, 17 Dec 2008 17:20:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-2593</guid>
		<description>To avoid such problem, first replace double spaces with a single space and then use this a solution may be (not tested)
LENGTH(REPLACE(REPLACE(name, &#039;  &#039;, &#039; &#039;), &#039; &#039;, &#039;&#039;))+1)</description>
		<content:encoded><![CDATA[<p>To avoid such problem, first replace double spaces with a single space and then use this a solution may be (not tested)<br />
LENGTH(REPLACE(REPLACE(name, &#8216;  &#8216;, &#8216; &#8216;), &#8216; &#8216;, &#8221;))+1)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hussain</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-2582</link>
		<dc:creator>Hussain</dc:creator>
		<pubDate>Wed, 17 Dec 2008 08:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-2582</guid>
		<description>Thanks alot..
but if you have two spaces thogether .. it will be counted as 2 words :)

any one have solution ?</description>
		<content:encoded><![CDATA[<p>Thanks alot..<br />
but if you have two spaces thogether .. it will be counted as 2 words <img src='http://www.mwasif.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>any one have solution ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jim cicon</title>
		<link>http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/comment-page-1/#comment-1902</link>
		<dc:creator>jim cicon</dc:creator>
		<pubDate>Sat, 25 Oct 2008 13:09:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mwasif.com/2008/12/count-number-of-words-in-a-mysql-column/#comment-1902</guid>
		<description>Really slick, thanks for the tip</description>
		<content:encoded><![CDATA[<p>Really slick, thanks for the tip</p>
]]></content:encoded>
	</item>
</channel>
</rss>
