Answer the question
In order to leave comments, you need to log in
Show on the site the organization at the address of residence, in the database there are 2000 addresses and 10 organizations. How to implement?
Good afternoon.
There is a charitable organization (head office). It is necessary to show the corresponding organization on the site in the form of searching for an organization by place of residence.
In total there are approximately 2000 addresses in the city and 10 service organizations. Everything in the table (Access database) is as follows:
1 column (Addresses); 2nd column (Range of houses); 3 column (Organization)
Gagarin; 1-42; Umbrella
Schmidt; 34-98; Helping hand
Then you need to have the parsed information shown on the map. For this I will already use the geocomplete library (I worked with it, I have an idea).
How to implement such a search?
Thank you.
Answer the question
In order to leave comments, you need to log in
If the houses are without buildings, then everything is quite simple.
The table will look like this:
street char(30)
hfrom int(4)
htill int(4)
org char(30)
For one house on the street for one organization, hfrom and htill will have the same values.
Organization selection:
SELECT org FROM table WHERE street = "street" AND {house number} BETWEEN hfrom AND htill
But this is too rough. It is better to make the Organization at the junction of the Street and House Number tables.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question