Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- dataSource
- Cluster
- KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED
- Query
- delete button
- NoClassDefFoundError
- command not found
- sqlSession
- 실행
- IPA
- backspace
- beanCreationException
- 아이튠즈
- googlemap
- color
- bash
- 삭제버튼
- 단축키
- mysql
- UITextField
- 삭제
- api19
- 색상 변경
- mybatis
- KVO
- DELETE
- itunes
- Detect
- Exception
- Drawer
Archives
- Today
- Total
BlueAroma
[MyBatis/SQL] 위경도로 일정 반경 내 정보 가져오기 본문
Sample_SQL.xml
<select id="selectSample" parameterType="Vo" resultType="hashmap"> <![CDATA[ SELECT *, (6371*acos(cos(radians(#{latitude}))*cos(radians(latitude))*cos(radians(longitude) -radians(#{longitude}))+sin(radians(#{latitude}))*sin(radians(latitude)))) AS distance FROM TABLE_NAME HAVING distance <= 2 ORDER BY distance ]]> </select> |
특정 위경도에서 반경 2km 내의 데이터 추출
'내맘대로 프로그래밍 > MariaDB&SQL' 카테고리의 다른 글
[MyBatis/SQL] 동적으로 map 에 담긴 key/value 이용하기 (0) | 2018.02.28 |
---|
Comments