Posts Tagged mysql function

Mysql function to soundex match a word in a multi word string






soundex is a very useful mysql function when we try to compare 2 words if they sounds similar. Here is the official manual for the function. Soundex is pretty easy to use when we are comparing 2 words. For example, check the following query: select if(soundex(‘Rösle’)= soundex(‘rosle’), 1, 0); It’ll return 1 as both the […]

, ,

9 Comments

Mysql function to find distance between two places using lat/long






Sometimes we need to find out list of places that are within a certain radius from a center place where coordinates of the places are saved in the database. Now we have 2 solutions for this – either loop through all the places find the distance from the center point and keep the places that […]

,

33 Comments