How to populate a CB Field with a Country List

15 years 7 months ago #31599 by joseph
heymcd wrote:

The attached SQL contains the entire list of 70+ states, provinces and territories recognized by the US and Canadian postal services.

The list has been formatted so that US values are the top values, then a seperator, then the Canadian values.

Create your custom cb_state field.

Replace the 'YY' with your table pre-fix, replace the 'XX' with your fieldid.

Tested successfully using phpMyAdmin 2.8.1 against a mySQL 5.0.18 database.

All the best, Bill.

Attachment State_SQL.txt not found


Can 'XX' any number that doesnt showed in my tables? Or any standar rules?
And how's when all goin wrong? Can I back to before insert it?

Please Log in to join the conversation.

15 years 7 months ago #31601 by joseph
heymcd wrote:

The attached SQL contains the entire list of 70+ states, provinces and territories recognized by the US and Canadian postal services.

The list has been formatted so that US values are the top values, then a seperator, then the Canadian values.

Create your custom cb_state field.

Replace the 'YY' with your table pre-fix, replace the 'XX' with your fieldid.

Tested successfully using phpMyAdmin 2.8.1 against a mySQL 5.0.18 database.

All the best, Bill.

Attachment State_SQL.txt not found


Can 'XX' any number that doesnt showed in my tables? Or any standar rules?
And how's when all goin wrong? Can I back to before insert it?

Please Log in to join the conversation.

15 years 7 months ago #31602 by joseph
heymcd wrote:

The attached SQL contains the entire list of 70+ states, provinces and territories recognized by the US and Canadian postal services.

The list has been formatted so that US values are the top values, then a seperator, then the Canadian values.

Create your custom cb_state field.

Replace the 'YY' with your table pre-fix, replace the 'XX' with your fieldid.

Tested successfully using phpMyAdmin 2.8.1 against a mySQL 5.0.18 database.

All the best, Bill.

Attachment State_SQL.txt not found


Can 'XX' any number that doesnt showed in my tables? Or any standar rules?
And how's when all goin wrong? Can I back to before insert it?

Please Log in to join the conversation.

15 years 7 months ago #32359 by moomola
Hi there,

I see this thread a bit late but as this is a field I know; the official and standard list of country and territory codes is available here:

www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html


This is iso 3166 list

Best

Please Log in to join the conversation.

15 years 5 months ago #35600 by spacewalk
In case you use it, the original downloadable list of U.S. states here (from the original Joomlapolis tutorial) contains an error: both Nevada and New Hampshire are #28.

Post edited by: spacewalk, at: 2007/04/13 16:27

Please Log in to join the conversation.

15 years 4 months ago #37868 by dartagnan
Hi guys,

I am wondering something, I recently made the countrylist population and it worked fine. But now everything is messed up for countrylist and for statelist. I think it is after I made some tests with the cb advanced search and performing "update of search fields", but I am not sure...
Anyway what happens is that the order is completely wrong. However, when I go to the database, everything is still in the same order....
Any idea where it may come from?

thanks

Planet Asia Asian tradition culture and community

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.248 seconds

Facebook Twitter LinkedIn