Skip to main content

Posts

Showing posts from May, 2018

Find points(latitude/longitude) within a distance using MySQL

Free Teachnology provide free php,mysql,jquery,javascript, MySQL - when you calculate distance between latitude/longitude its simple way : Step : 1  create table as per your requirement and two column  latitude/longitude with data type Double Range On a client project recently, we had to make it easy to filter database query results based on the distance between a user and an entity in our database. It's easy to get overwhelmed in that context, worrying about the crazy amount of PHP calculations you're going to have to run. MySQL can do that! If you need to calculate this, you can actually get far by just using MySQL! MySQL 5.7 introduced latitude, which is a native function to calculate the distance between two points. That’s an interesting start but it doesn’t apply with Geography since the distance between lines of latitude and longitude are not an equal distance apart. As you get closer to the equator, lines of latitude get further apart. If you u...