Convert 'C' function to SQL

IN PROGRESS
Bids
4
Avg Bid (USD)
$24
Project Budget (USD)
$10 - $30

Project Description:
I want to convert the PHP function "SIMILAR_TEXT" into an SQL (preferably MYSQL) Function that returns a % match.
SIMILAR_TEXT is a fuzzy string matching function, but I want to use it via MYSQL, and to also return a % match.
You can try it out here : http://www.functions-online.com/similar_text.html

The function is very small, and written in 'C'. The original C code is attached within the 'string.c' file.
A simpler version in pure 'C' in the attached 'c_version.txt' file.

The end result should be a MYSQL (or SQL) FUNCTION of the type FN_SIMILAR_TEXT(str1, str2) RETURNS FLOAT;
that returns the % match between the two strings.

Skills required:
C Programming, MySQL, PHP, SQL
Additional Files: c_version.txt string.c
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


Hire adelline
$ 30
in 1 days
$ 30
in 1 days
$ 10
in 3 days
$ 25
in 3 days