How to populate a CB Field with a Country List

14 years 9 months ago #60830 by ryurage
Alright, this is the second time and last time I'll try to post this. This joomlapolis.com site totally rules except the session time on here blows. Nothing like typing out a post and it not getting posted. [/rant]

Moving on. I have a host (bluehost) and they have several built in programs to input sql. They have PHPMyAdmin and it's a piece of cake to use without being a guru. However, they do NOT have that option built in with it to 'insert data from a text file'. Crap!! Here's what to do:

1. Download my file from this post and open in in a text editor to change the line that says 'var fieldid'. Make the fieldid equal to your number. Save the file.

2. Open the file in a browser. Copy all of it.

3. Next, go to your PHPMyAdmin and click the '_joom2' database and then the 'jos_comprofiler_field_values' table.

4. Now click the 'SQL' tab at the top. Paste. Don't touch anything else except click the 'Go' button. Done.

You now have a decent country list. Apostrophes in the country name won't mess things up either.

Please Log in to join the conversation.

14 years 9 months ago #60831 by ryurage
Alright, apparently you can't submit .html files. I wish this forum would tell me that before my post gets posted. Anyways, just change the .txt to .html when you download my country list sql.

Attachment country_list_sql.txt not found

Attachments:

Please Log in to join the conversation.

14 years 8 months ago #62344 by sjnims
Replied by sjnims on topic Re:Country list - Can't it be more easier?
Any updates on this?

Please Log in to join the conversation.

14 years 8 months ago #62559 by ubertramp
ryurage wrote:

Alright, this is the second time and last time I'll try to post this. This joomlapolis.com site totally rules except the session time on here blows. Nothing like typing out a post and it not getting posted. [/rant]

Moving on. I have a host (bluehost) and they have several built in programs to input sql. They have PHPMyAdmin and it's a piece of cake to use without being a guru. However, they do NOT have that option built in with it to 'insert data from a text file'. Crap!! Here's what to do:

1. Download my file from this post and open in in a text editor to change the line that says 'var fieldid'. Make the fieldid equal to your number. Save the file.

2. Open the file in a browser. Copy all of it.

3. Next, go to your PHPMyAdmin and click the '_joom2' database and then the 'jos_comprofiler_field_values' table.

4. Now click the 'SQL' tab at the top. Paste. Don't touch anything else except click the 'Go' button. Done.

You now have a decent country list. Apostrophes in the country name won't mess things up either.


Thanks, ryurage, you made the whole process 1000 times easier. Kudos!

www.ubertramp.com

Please Log in to join the conversation.

14 years 7 months ago #64812 by Dukessa
BlueFightingCat wrote:

Hi,

One point. Serbia and Montenegro are no longer one. They should be seperated. USSR no longer exists either.
I made a new list of countries that have the sql commands ready in them. So all you have to do is import the file.
Thanks

BFC

Post edited by: BlueFightingCat, at: 2006/11/01 21:17

Attachment country_list.txt not found



Post edited by: BlueFightingCat, at: 2006/11/01 21:51


Thank you for that sql file, but I was wondering...
The fieldvalueid is what your DB generated, depending on other fields you have in the table already.
What if at one given fieldvalueid I have something else already? Is that going to overwrite whats there?
My latest fieldvalueid was 288, and your list starts with fieldvalueids from 21 to 268...

Is it possible to have a sql ready file with all those countries, but so that nothing can be overwritten or messed up?
Where I only have to change my fieldid, and the DB gives the fieldvalueid on its own?

Post edited by: Dukessa, at: 2008/06/05 21:40

***Dukessa***
[J 1.5.3+CB 1.1]

Please Log in to join the conversation.

14 years 3 months ago #77786 by alibak
the sql file is not populating because I already have a fieldvalueid number 21... (to start with)...

so..

how does one set this up?

also, is there a state file of such thing?

is there a way of first seeing whether the person lives in the US, and if yes, then the states would load?

if someone knows this.. i'm sure everyone would benefit from a line by line recipe.
thank you very much.:)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.232 seconds

Facebook Twitter LinkedIn