<?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 for codejanitor</title>
	<atom:link href="http://codejanitor.com/wp/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://codejanitor.com/wp</link>
	<description>open source code and solutions</description>
	<pubDate>Sun, 05 Jul 2009 02:43:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by Aaron D. Campbell</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-2075</link>
		<dc:creator>Aaron D. Campbell</dc:creator>
		<pubDate>Sun, 28 Jun 2009 14:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-2075</guid>
		<description>I have a zip code database for the US.  When I do a query like this it took almost 30 seconds:

SELECT  `zipcode` ,  `city` ,  `statecode` , (
	( 5 * levenshtein(
		'85326', LOWER( `zipcode` ) )
	)
) AS ld
FROM `zipcode`
HAVING `ld` &#60;50
ORDER BY `ld` , `city`
LIMIT 50


The same query after compiling and installing the UDF from http://joshdrew.com/ took .1 seconds.  I don't know if it's related to the all number issue mentioned above or if it's because it's an 8.7M table with 70k+ rows, but it's definitely too slow for me to use.</description>
		<content:encoded><![CDATA[<p>I have a zip code database for the US.  When I do a query like this it took almost 30 seconds:</p>
<p>SELECT  `zipcode` ,  `city` ,  `statecode` , (<br />
	( 5 * levenshtein(<br />
		&#8216;85326&#8242;, LOWER( `zipcode` ) )<br />
	)<br />
) AS ld<br />
FROM `zipcode`<br />
HAVING `ld` &lt;50<br />
ORDER BY `ld` , `city`<br />
LIMIT 50</p>
<p>The same query after compiling and installing the UDF from <a href="http://joshdrew.com/" rel="nofollow">http://joshdrew.com/</a> took .1 seconds.  I don&#8217;t know if it&#8217;s related to the all number issue mentioned above or if it&#8217;s because it&#8217;s an 8.7M table with 70k+ rows, but it&#8217;s definitely too slow for me to use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by Morgan</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-2043</link>
		<dc:creator>Morgan</dc:creator>
		<pubDate>Thu, 18 Jun 2009 06:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-2043</guid>
		<description>Good work. I add this part to check those null values. Thanks

DECLARE cv0, cv1 VARBINARY(256); 
SET cv1 = 0x00, j = 1, i = 1, c = 0; 
IF s1 IS NULL THEN SET s1_len =0; 
ELSE SET s1_len = CHAR_LENGTH(s1); 
END IF; 
IF s2 IS NULL THEN SET s2_len =0; 
ELSE SET s2_len = CHAR_LENGTH(s2); 
END IF;</description>
		<content:encoded><![CDATA[<p>Good work. I add this part to check those null values. Thanks</p>
<p>DECLARE cv0, cv1 VARBINARY(256);<br />
SET cv1 = 0&#215;00, j = 1, i = 1, c = 0;<br />
IF s1 IS NULL THEN SET s1_len =0;<br />
ELSE SET s1_len = CHAR_LENGTH(s1);<br />
END IF;<br />
IF s2 IS NULL THEN SET s2_len =0;<br />
ELSE SET s2_len = CHAR_LENGTH(s2);<br />
END IF;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by tom</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-1970</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Thu, 21 May 2009 16:07:57 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-1970</guid>
		<description>@Tobi: thanks for the compile tips. works nice.

but beware that mysql_config argument is minus minus cflags, this blog thing seems to modify the minus minus into some other kind of dash.</description>
		<content:encoded><![CDATA[<p>@Tobi: thanks for the compile tips. works nice.</p>
<p>but beware that mysql_config argument is minus minus cflags, this blog thing seems to modify the minus minus into some other kind of dash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by Les</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-1720</link>
		<dc:creator>Les</dc:creator>
		<pubDate>Sun, 22 Feb 2009 07:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-1720</guid>
		<description>Thanks for the code if works well but I would like to use it with the Damerau option included. Does anyone have a stored procedure available with the Damerau option included?</description>
		<content:encoded><![CDATA[<p>Thanks for the code if works well but I would like to use it with the Damerau option included. Does anyone have a stored procedure available with the Damerau option included?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by Tom</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-1682</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 22 Jan 2009 17:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-1682</guid>
		<description>Thanks for the code; it works fine, no problems so far. 
But I wish to use it on a large amount of entries (~30000+), which takes quite some time. I wonder if there's any possibility to limit the maximum difference to a constant value, e.g. 10, so differences greater than that don't need to be calculated to reduce computing time.
Would that be possible?</description>
		<content:encoded><![CDATA[<p>Thanks for the code; it works fine, no problems so far.<br />
But I wish to use it on a large amount of entries (~30000+), which takes quite some time. I wonder if there&#8217;s any possibility to limit the maximum difference to a constant value, e.g. 10, so differences greater than that don&#8217;t need to be calculated to reduce computing time.<br />
Would that be possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by Steffen</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-1679</link>
		<dc:creator>Steffen</dc:creator>
		<pubDate>Wed, 07 Jan 2009 13:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-1679</guid>
		<description>I get serious problems when trying to compare strings containing numbers only. MySQL server seems to crash!

query: ...LEVENSHTEIN(`POSTALCODE`,'14482') &#60;= 2...
result: #2006 - MySQL server has gone away

What could be the problem?</description>
		<content:encoded><![CDATA[<p>I get serious problems when trying to compare strings containing numbers only. MySQL server seems to crash!</p>
<p>query: &#8230;LEVENSHTEIN(`POSTALCODE`,&#8217;14482&#8242;) &lt;= 2&#8230;<br />
result: #2006 - MySQL server has gone away</p>
<p>What could be the problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by Jason</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-1665</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 26 Nov 2008 18:01:48 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-1665</guid>
		<description>Are you changing the delimiter before trying to create the function?  You'll need to do that so that the semicolons in the function don't mess up creating the function.  See here: http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html</description>
		<content:encoded><![CDATA[<p>Are you changing the delimiter before trying to create the function?  You&#8217;ll need to do that so that the semicolons in the function don&#8217;t mess up creating the function.  See here: <a href="http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by aleza</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-1664</link>
		<dc:creator>aleza</dc:creator>
		<pubDate>Wed, 26 Nov 2008 11:36:41 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-1664</guid>
		<description>PLease anyone? i need this mysql function working and I keep getting sintax errors, i am using WAMP (mysql5.0.51b)

please i need help
I keep getting this error

Error

SQL query:

CREATE FUNCTION LEVENSHTEIN(
s1 VARCHAR( 255 ) ,
s2 VARCHAR( 255 )
) RETURNS INTDETERMINISTIC BEGIN DECLARE s1_len,
s2_len,
i,
j,
c,
c_temp,
cost INT;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5</description>
		<content:encoded><![CDATA[<p>PLease anyone? i need this mysql function working and I keep getting sintax errors, i am using WAMP (mysql5.0.51b)</p>
<p>please i need help<br />
I keep getting this error</p>
<p>Error</p>
<p>SQL query:</p>
<p>CREATE FUNCTION LEVENSHTEIN(<br />
s1 VARCHAR( 255 ) ,<br />
s2 VARCHAR( 255 )<br />
) RETURNS INTDETERMINISTIC BEGIN DECLARE s1_len,<br />
s2_len,<br />
i,<br />
j,<br />
c,<br />
c_temp,<br />
cost INT;</p>
<p>MySQL said: Documentation<br />
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8221; at line 5</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levenshtein Distance as a MySQL Stored Function by aleza</title>
		<link>http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/comment-page-1/#comment-1663</link>
		<dc:creator>aleza</dc:creator>
		<pubDate>Tue, 25 Nov 2008 16:25:12 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2007/02/10/levenshtein-distance-as-a-mysql-stored-function/#comment-1663</guid>
		<description>I keep getting sintax errors! I really need this function!</description>
		<content:encoded><![CDATA[<p>I keep getting sintax errors! I really need this function!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AJAX, Safari, and Returning an HTTP Error Code by Scott</title>
		<link>http://codejanitor.com/wp/2006/03/30/ajax-safari-and-returning-an-http-error-code/comment-page-1/#comment-1547</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Thu, 23 Oct 2008 16:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://codejanitor.com/wp/2006/03/30/ajax-safari-and-returning-an-http-error-code/#comment-1547</guid>
		<description>Is it weird that I did another google search and ended up on the same page I commented on two years ago? The internet can be a very small place sometimes. Again, I found this to be useful. Thanks.</description>
		<content:encoded><![CDATA[<p>Is it weird that I did another google search and ended up on the same page I commented on two years ago? The internet can be a very small place sometimes. Again, I found this to be useful. Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
