Tables linked by country, community/state, province, locations. Currently only Spain, database updated until December 2022, which includes the latest territorial updates. This structure is ready to be imported into MySql
ROW | TYPE | DETAILS |
---|---|---|
id | tinyint(4) | Autonumber unique identifier |
title | varchar(100) | Name of the country |
ROW | TYPE | DETAILS |
---|---|---|
id | tinyint(4) | Autonumber unique identifier |
title | varchar(100) | Name of the state |
country_id | tinyint(4) | idLink country-state |
ROW | TYPE | DETAILS |
---|---|---|
id | tinyint(4) | Autonumber unique identifier |
title | varchar(100) | Name of the location |
states_id | tinyint(4) | idLink state-location |
If you haven´t database create, you must create database before of import the scripts
Import the database in the order exactly indiqued and country seleccioned /scr/getting-start/
- app_countries.sql
- app_ccaa.sql
- app_states.sql
- app_locations.sql
Now, Select your country in src/ and import in the database in the order exactly
- app_countries.sql
- app_ccaa.sql
- app_states.sql
- app_locations.sql
src/spain --> Spain src/eeuu --> United States
Exec sql for view results after insert rows
SELECT loc.title AS 'Location',st.title AS 'State', cc.title AS 'CCAA', co.title AS 'Country' FROM app_locations loc LEFT JOIN app_states st ON st.id = loc. states_id LEFT JOIN app_ccaa cc ON cc.id = st.ccaa_id LEFT JOIN app_countries co ON co.id = st.country_id ORDER BY loc.id DESC
## Autor --- Alejandro Estévez (Yanker)
- Icons: https://skillicons.dev
- Lists of countries, states and locations in INE ** SPAIN INE
Distributed under the MIT License. See LICENSE.txt for more information.
History of updates in changelog
Thank you I hope what you utils my projects! If you want contact whith me you want open issues.
Made with 💌 from 🇪🇸