Similarity Results

Hello friends, is there any option to dispaly the similarity values in grid

when we search the company name in the column search,need to display the similar name of company names display and search and sort of similiar values

please suggest me is this possible or not ?

in the php have a function like

similar_text , it returns the percenatge of word

and another function is availble Levenshtein_distance

we can apply the Levenshtein_distance function in mysql.

i need to know can we apply these function in yii or any default function is avaliable or not…please help me

thank you

subbu vemuri

you can write a custome query on model search function…

for e.g

if(isset($this->company_name) && !empty($this->company_name)){

            $criteria = new CDbCriteria;

            $criteria->select = 't.*';

            $criteria->addCondition("company_name LIKE '".$this->company_name."'");