Advertisement:

Author Topic: Update UK cities and regions  (Read 3284 times)

Markpeter

  • Newbie
  • *
  • Posts: 12
Update UK cities and regions
« on: March 14, 2014, 01:58:54 pm »
Hello all,

I have noticed some errors in the uk locations file. The SQL will need to tailored for your database, but here is what worked on my database.

change great manchester to greater manchester
UPDATE `db_oscl355`.`osc05_t_region` SET `fk_c_country_code` = 'GB', `s_name` = 'Greater Manchester' WHERE `osc05_t_region`.`pk_i_id` = 741078;

change great London to greater London
UPDATE `db_oscl355`.`osc05_t_region` SET `s_name` = 'Greater London' WHERE `osc05_t_region`.`pk_i_id` = 740996;

Add Welsh and Scottish towns

REPLACE INTO /*TABLE_PREFIX*/osc05_t_region (pk_i_id, fk_c_country_code, s_name, b_active) VALUES
(742189, 'gb', 'Wales', 1);

REPLACE INTO /*TABLE_PREFIX*/osc05_t_city (pk_i_id, fk_i_region_id, fk_c_country_code, s_name, b_active) VALUES
(36320, 742189, 'gb', 'Aberystwyth', 1),
(36321, 742189, 'gb', 'Bagor', 1),
(36322, 742189, 'gb', 'Cardiff', 1),
(36323, 742189, 'gb', 'Caernarfon', 1),
(36324, 742189, 'gb', 'Colwyn Bay', 1),
(36325, 742189, 'gb', 'Carmarthen', 1),
(36326, 742189, 'gb', 'Milford Haven', 1),
(36327, 742189, 'gb', 'Neath', 1),
(36328, 742189, 'gb', ' Newport, Gwent', 1),
(36329, 742189, 'gb', 'Swansea ', 1);

REPLACE INTO /*TABLE_PREFIX*/osc05_t_region (pk_i_id, fk_c_country_code, s_name, b_active) VALUES
(742199, 'gb', 'Scotland', 1);

REPLACE INTO /*TABLE_PREFIX*/osc05_t_city (pk_i_id, fk_i_region_id, fk_c_country_code, s_name, b_active) VALUES
(36329, 742199, 'gb', 'Aberdeen', 1),
(36330, 742199, 'gb', 'Cumbernauld', 1),
(36331, 742199, 'gb', 'Dundee', 1),
(36332, 742199, 'gb', 'East Kilbride', 1),
(36333, 742199, 'gb', 'Edinburgh', 1),
(36334, 742199, 'gb', 'Glasgow', 1),
(36335, 742199, 'gb', 'Hamilton', 1),
(36336, 742199, 'gb', ' Inverness', 1),
(36337, 742199, 'gb', 'Kirkcaldy and Dysart', 1),
(36338, 742199, 'gb', 'Livingston', 1),
(36339, 742199, 'gb', 'Paisley', 1);


Hope it helps!

http://wizevents.co.uk

Ramesh

  • Jr. Member
  • **
  • Posts: 61
Re: Update UK cities and regions
« Reply #1 on: March 22, 2014, 02:35:26 pm »
nice for telling every one ....
any one needing help regarding small customizations can contact me . i am ready to help

DrLightman

  • Newbie
  • *
  • Posts: 36
Re: Update UK cities and regions
« Reply #2 on: June 06, 2014, 08:04:43 pm »
Thank you.

I also noticed London city is missing?! There is a London region though.

Aficionado

  • Guest
Re: Update UK cities and regions
« Reply #3 on: June 06, 2014, 10:52:29 pm »
Well i have created a different data sql, following

www.   gumtree.   com

structure for UK, including Scotlanld, Wales etc etc. Lots of changes.


mantas

  • Jr. Member
  • **
  • Posts: 52
Re: Update UK cities and regions
« Reply #4 on: July 06, 2014, 11:25:00 pm »
Well i have created a different data sql, following

www.   gumtree.   com

structure for UK, including Scotlanld, Wales etc etc. Lots of changes.
Thumbs up. It would be great all these modifications come with next Osclass core release

nexxusone

  • Newbie
  • *
  • Posts: 1
Re: Update UK cities and regions
« Reply #5 on: July 14, 2014, 02:07:09 am »
Well i have created a different data sql, following

www.   gumtree.   com

structure for UK, including Scotlanld, Wales etc etc. Lots of changes.


any chance of list , zip or sql ?

fr4nk

  • Full Member
  • ***
  • Posts: 102
Re: Update UK cities and regions
« Reply #6 on: July 22, 2014, 03:30:53 pm »
Well i have created a different data sql, following

www.   gumtree.   com

structure for UK, including Scotlanld, Wales etc etc. Lots of changes.


any chance of list , zip or sql ?

Yeah please could you provide us with this updated UK file taken from gumtree ? I have all them counties and cities in text files but don't know how to generate sql file from them which can be uploaded to OSC.
Frank

fr4nk

  • Full Member
  • ***
  • Posts: 102
Re: Update UK cities and regions
« Reply #7 on: July 27, 2014, 08:32:58 pm »
I have all UK, Scotland, Wales cities in txt files could anybody create import file from them please ? PM please

whitedoggy

  • Newbie
  • *
  • Posts: 10
Re: Update UK cities and regions
« Reply #8 on: September 04, 2015, 09:51:50 pm »
Anyone managed to create relevant files to install or can anyone tell me the easiest way to create entries for Scotland Ireland and Wales.

Many Thanks

Aficionado

  • Guest
Re: Update UK cities and regions
« Reply #9 on: September 04, 2015, 10:14:23 pm »
I have tried to CONTACT Osclass to GIVE THEM MY SQL (and other countries) and i GOT NO REPLY. Nothing.

So i can't help. I want but i can't. There is no way to Export a Country.


whitedoggy

  • Newbie
  • *
  • Posts: 10
Re: Update UK cities and regions
« Reply #10 on: September 04, 2015, 10:21:36 pm »
Looking at all this location topics, it seems to me, although Wales Ireland and Scotland are within the United Kingdom, in this sort of setting, they are very much countries in there own rights?

Does this seem the right way to go for others?






Hello all,

I have noticed some errors in the uk locations file. The SQL will need to tailored for your database, but here is what worked on my database.

change great manchester to greater manchester
UPDATE `db_oscl355`.`osc05_t_region` SET `fk_c_country_code` = 'GB', `s_name` = 'Greater Manchester' WHERE `osc05_t_region`.`pk_i_id` = 741078;

change great London to greater London
UPDATE `db_oscl355`.`osc05_t_region` SET `s_name` = 'Greater London' WHERE `osc05_t_region`.`pk_i_id` = 740996;

Add Welsh and Scottish towns

REPLACE INTO /*TABLE_PREFIX*/osc05_t_region (pk_i_id, fk_c_country_code, s_name, b_active) VALUES
(742189, 'gb', 'Wales', 1);

REPLACE INTO /*TABLE_PREFIX*/osc05_t_city (pk_i_id, fk_i_region_id, fk_c_country_code, s_name, b_active) VALUES
(36320, 742189, 'gb', 'Aberystwyth', 1),
(36321, 742189, 'gb', 'Bagor', 1),
(36322, 742189, 'gb', 'Cardiff', 1),
(36323, 742189, 'gb', 'Caernarfon', 1),
(36324, 742189, 'gb', 'Colwyn Bay', 1),
(36325, 742189, 'gb', 'Carmarthen', 1),
(36326, 742189, 'gb', 'Milford Haven', 1),
(36327, 742189, 'gb', 'Neath', 1),
(36328, 742189, 'gb', ' Newport, Gwent', 1),
(36329, 742189, 'gb', 'Swansea ', 1);

REPLACE INTO /*TABLE_PREFIX*/osc05_t_region (pk_i_id, fk_c_country_code, s_name, b_active) VALUES
(742199, 'gb', 'Scotland', 1);

REPLACE INTO /*TABLE_PREFIX*/osc05_t_city (pk_i_id, fk_i_region_id, fk_c_country_code, s_name, b_active) VALUES
(36329, 742199, 'gb', 'Aberdeen', 1),
(36330, 742199, 'gb', 'Cumbernauld', 1),
(36331, 742199, 'gb', 'Dundee', 1),
(36332, 742199, 'gb', 'East Kilbride', 1),
(36333, 742199, 'gb', 'Edinburgh', 1),
(36334, 742199, 'gb', 'Glasgow', 1),
(36335, 742199, 'gb', 'Hamilton', 1),
(36336, 742199, 'gb', ' Inverness', 1),
(36337, 742199, 'gb', 'Kirkcaldy and Dysart', 1),
(36338, 742199, 'gb', 'Livingston', 1),
(36339, 742199, 'gb', 'Paisley', 1);


Hope it helps!

http://wizevents.co.uk

Aficionado

  • Guest
Re: Update UK cities and regions
« Reply #11 on: September 04, 2015, 10:54:41 pm »
Looking at all this location topics, it seems to me, although Wales Ireland and Scotland are within the United Kingdom, in this sort of setting, they are very much countries in there own rights?

Does this seem the right way to go for others?



Just check www. gumtree . com N1 UK Classifeds.

whitedoggy

  • Newbie
  • *
  • Posts: 10
Re: Update UK cities and regions
« Reply #12 on: September 05, 2015, 12:06:31 am »
Seems to me as though they treat each as it's own entity.