SELECT id, Longitude, Latitude, ( 3959 * acos( cos( RADIANS(50) ) * cos( radians( Latitude ) ) * cos( radians( Longitude ) - radians(7) ) + sin( RADIANS(50) ) * sin( radians( Latitude ) ) ) ) AS distance FROM gpslocation HAVING distance < 25 ORDER BY DISTANCE LIMIT 0 , 20;

Notice that number 50 is twice mentioned in query.