Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7886723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:23:27+00:00 2026-06-03T05:23:27+00:00

i am designing a recruitment database, and i need it to perform several tasks

  • 0

i am designing a recruitment database, and i need it to perform several tasks that all involve integrating a way of calculating distance:

1) calculate the distance the candidate lives from the client?

2) calculate the clients within a radius of the candidates available for work on any given day?

3) calculating the number of candidates with the correct qualifications for the vacancy within a radius of the client.

as you can see i need to calculate the distance in 2 main ways 1) radius 2) as the crow flies, i would prefer exact distance but the first will do.
i know that i can integrate Google maps or some other web based mapping but i want the system to be stand alone so it can function without an internet connection.
the system will have a HTML5 front end and the Back end is in Mysql and PHP.

thank you biagio

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:23:29+00:00Added an answer on June 3, 2026 at 5:23 am

    The distance between 2 points could be calculated with the following formula :

    6371*acos(cos(LatitudeA)*cos(LatitudeB)*cos(longitudeB-longitudeA)+sin(LatitudeA)*sin(latitudeB))
    

    Of course it’s a “crow flies” approximation in Km.

    Wich can be translated to php by :

    $longA     = 2.3458*(M_PI/180); // M_PI is a php constant
    $latA     = 48.8608*(M_PI/180);
    $longB     = 5.0356*(M_PI/180);
    $latB     = 47.3225*(M_PI/180);
    
    $subBA       = bcsub ($longB, $longA, 20);
    $cosLatA     = cos($latA);
    $cosLatB     = cos($latB);
    $sinLatA     = sin($latA);
    $sinLatB     = sin($latB);
    
    $distance = 6371*acos($cosLatA*$cosLatB*cos($subBA)+$sinLatA*$sinLatB);
    echo $distance ;
    

    With that you could compute the distance between two points (people) and of course determine if a point is in a radius of an other.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

for designing purposes i need to truncate all DB which has lots of FK's.
the designing.making/deploying/management of a distributed database? or do i need to buy the versions
Im designing a simple dealership site that involves several features. Users can sign on
Im designing a website, and often I need to present information in a nice
When designing a stock management database system for sales and purchases what would be
When designing a web service that will allow the consumer of the service to
While designing applications it is a very good practice to have all the business
When designing the base styles for a site, one should strive to address all
When designing a database, what usually determines what tables will be the primary and
Designing an interface with QT4 I have been advised that using multiple Tabs at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.