but i am not taking image. here is the code :
this is repository:
$courseqry = 'SELECT TOP '.$limit.' sName,pkCourse,sCity,sStateOrProvince,sCountry,
sZipcode FROM Course where SOUNDEX('."'$searchword'".') = SOUNDEX(sName)';
if(($country !="null") && ($country!=null))
{
$courseqry=$courseqry . " and sCountry like "."'%$country%'";
}
$coursename=DB::select($courseqry);
this is control:
public function fn_searchcourses($limit,$country,$misspell,$searchword)
{
if($limit > 100 || $misspell >2)
{
$returnerrors['Error']="Sorry something went wrong, The maximum limit is 100 && You should pass misspellmatch is 0,1 or 2(0-default, 1-similar,2-exact";
return $returnerrors;
}
$results = $this->search_Course->rep_getsearchcourses($limit,$country,$searchword,$misspell);
return $results;
}