按纬度/经度搜索数据库中的位置。 [英] Searching for a location in the database by latitude/longitude.

查看:63
本文介绍了按纬度/经度搜索数据库中的位置。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨兄弟我是新来的,需要帮助使用sql的php编程基本上我给了一个任务来创建一个PHP代码,能够在一些免费托管网站上查询数据库,我alreadx现在已经完成了数据库我我试图查询数据库,我不知道如何做到这一点我想找到纬度顶部,纬度底部和经度顶部和长度底部之间的值,如果介于它之间它将返回我的alreadx表已完成的分区名称除外编码这就是我目前所拥有的:

Hi brothers I am new here need help with the php programing using sql basically I am given a task to create a php code that is able to query the database on some free hosting web which I alreadx have the database done right now I am trying to query the database and I have no idea how to do it I wanted to find the value between the Latitude top, latitude bottom and longtitude top and longtitude bottom if it is between it will return the districtname I alreadx have the table done except the coding this is what I currently have:

展开 | 选择 | Wrap | 行号

推荐答案

更改主题标题以更好地描述问题。


Heya,Rocky。


你的代码产生了什么?发表一个例子。

它应该生产什么?发表一个例子。

你收到错误了吗?发布错误消息。
Changed thread title to better describe the problem.

Heya, Rocky.

What does your code produce? Post an example.
What is it supposed to produce? Post an example.
Are you getting an error? Post the error message.


这是需要使用

区表
This is the table require to be use

District Table
展开 | 选择 | Wrap | 行号


Heya,Rocky86。


您可以简化查询稍微使用BETWEEN运算符。

Heya, Rocky86.

You can probably simplify your query a little bit by using the BETWEEN operator.

展开 | 选择 | Wrap | 行号


这篇关于按纬度/经度搜索数据库中的位置。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆