OS Property support center

Error when adding new location list

  • Johan Wagenheim
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 11 months ago #31580 by Johan Wagenheim
Error when adding new location list was created by Johan Wagenheim
Hi,
I've created a new location list for Australia, but when I try to add it to OS Property (v. 2.0.8) I get a mySQL error (starts like this:
Code:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'aguilar','12','104',0),(NULL,'Dagmar','12','104',0),(NULL,'Dagun','12','104',0),' at line 1 SQL=INSERT INTO i0dm4_osrs_cities (id,city,country_id,state_id,published) VALUES (NULL,'Abbeywood','12','104',0),(NULL,'Abbotsford','12','104',0),(NULL,'Abingdon Downs','12','104',0),(NULL,'Abington','12','104',0),(NULL,'Acacia Ridge','12','104',0),(NULL,'Acland','12','104',0),(NULL,'Adare','12','104',0),(NULL,'Advancetown','12','104',0),(NULL,'Aeroglen','12','104',0),(NULL,'Agnes Water','12','104',0),(NULL,'Airlie Beach','12','104',0),(NULL,'Aitkenvale','12','104',0),(NULL,'Albany Creek','12','104',0),(NULL,'Alderley','12','104',0),(NULL,'Aldershot','12','104',0),(NULL,'Aldoga','12','104',0),(NULL,'Alexandra','12','104',0),(NULL,'Alexandra Headland','12','104',0),(NULL,'Alexandra Hills','12','104',0),(NULL,'Algester','12','104',0),(NULL,'Alice Creek','12','104',0),(NULL,'Allan','12','104',0),(NULL,'Allenstown','12','104',0),(NULL,'Alligator Creek','12','104',0)
I have attached the file, but as far as I can see the formatting is identical to the original location files supplied with OS Property (they import correctly).
Any ideas why I get this MySQL error with my own location file only?
Attachments:

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #31608 by Mr. Dam
Replied by Mr. Dam on topic Re: Error when adding new location list
Hi,
because in the cities names, you have ' character. for example : D'aguilar, it's the reason to make the error in the sql query.
Thanks
Dam
The following user(s) said Thank You: Johan Wagenheim

Please Log in or Create an account to join the conversation.

  • Johan Wagenheim
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 11 months ago #31636 by Johan Wagenheim
Replied by Johan Wagenheim on topic Re: Error when adding new location list
Great, that solved the issue. I have imported the cities, but the previous cities where not removed, only unpublished. Two questions:
1. How can I remove the cities I don't need? I have about 5000 cities.
2. How can I publish all the cities I've added?

In both cases, the states and cities lists only display 20 items/page, and it takes a lot of time to go through all the pages and publish or remove cities if I only can do 20 on each page. Are there any easier way to do this?

Thanks for great support

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #31660 by Mr. Dam
Replied by Mr. Dam on topic Re: Error when adding new location list
Hi,
The best way is you re-do the location files and remove the cities that you don't need.
And then you can re-import again the location file.
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago - 11 years 2 months ago #42695 by Acemi
Replied by Acemi on topic Re: Error when adding new location list
to Question 2: you can update DB with this Query: "UPDATE mm4bp_osrs_cities SET `published`= 1 WHERE `country_id` = 71 AND `published`= 0" Table name "xxxxxx_osrs_cities" can an another by your installation AND please check your country_id. (71 is for germany!)
Last edit: 11 years 2 months ago by Acemi.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #42699 by Mr. Dam
Replied by Mr. Dam on topic Re: Error when adding new location list
Hi Acemi,
This functionality happens when you publish location of one country. You have error with that function?
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #42702 by Acemi
Replied by Acemi on topic Re: Error when adding new location list
my Problem was, i must publish for germany all citizen page for page in Backend. with this query was possible over phpmyadmin all citizen to publish.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #42703 by Mr. Dam
Replied by Mr. Dam on topic Re: Error when adding new location list
Hi Acemi,
It's strange. Can you please submit ticket and send your site information with super admin acc, ftp acc. I will check the problem for you
Thanks
Dam

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #42809 by Aydın
Replied by Aydın on topic Re: Error when adding new location list

Acemi wrote: my Problem was, i must publish for germany all citizen page for page in Backend. with this query was possible over phpmyadmin all citizen to publish.

Kardeş Merhaba, sitenin adresi nedir acaba yaptığın. İhtiyacın olan birşey varsa yardımcı olabilirim.
Kolaylıklar

Aydın
The following user(s) said Thank You: Mr. Dam

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #42824 by Acemi
Replied by Acemi on topic Re: Error when adding new location list
Aydin merhaba,
hazirladigim sayfa henüz online degil. Ülke isimlerinin bulundugu dropdown'da sadece Almanya ve Türkiye kalsin istiyorum. Admin sayfasinda diger ülkeleri databank'dan silmeden deaktive etmenin bir yolu var mi?
Tesekkür ederim,
Devrim.

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan