How to add levenshtein function in mysql?
问题 I got the code for levenshtein distance for mysql form \"http://kristiannissen.wordpress.com/2010/07/08/mysql-levenshtein/\" but, how to add that function in mysql? I am using xampp and i need it for search in php. 回答1: I have connected to my MySQL server and simply executed this statement in MySQL Workbench, and it simply worked - I now have new function levenshtein() . For example, this works as expected: SELECT levenshtein('abcde', 'abced') 2 回答2: DELIMITER $$ CREATE FUNCTION levenshtein(