Gossamer Forum
Home : Products : Gossamer Links : Discussions :

step by step import ???

Quote Reply
step by step import ???
HiWink

I have an excel file with only one column of about 2000 email addresses.

Il would like to import all these emails in the user table

What is the exact procedure I have to follow?

Can someone help me in using the import datas mod.

email1@email.com
email2@email.com
email3@email.com
.
.
.
.
email2000@email.com



Txs for your help

FMP
Quote Reply
Re: [fmp] step by step import ??? In reply to
Why you want to add email addresses?
Are you sure you want them into user table? Why?

Likely you just want to use for mass mailings, right?
In that case it's enough to export from excel to a text file, where addresses are separated by spaces or new lines, then add to Admin/Email/Custom Lists/Add.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] step by step import ??? In reply to
Hi Webmaster33

txs for your answer....

In fact, I use the user table as a member table and I give access to some private parts of my website (depending their status).

So I want these emails to become members :

I could give as the login the email adresse and as the password a generated one by LSQL, then I could send them their access codes....

Then for all the email adresses I would have

Username : email@email.com
Password : ageneratedone
Email : email@email.com
Status : Validated
ReceiveMail : Yes
Newsletter : Yes

FMP
Quote Reply
Re: [fmp] step by step import ??? In reply to
You would be best writing a small perl script for this using GT::SQL. You would need to export from Excel to a flatfile and then the perl code would read the email list and insert the new records into the user table.

It would also be able to insert random passwords.
Quote Reply
Re: [fmp] step by step import ??? In reply to
Uhm, that's difficulter.
You may want to analyze the import part of admin\Links\Import\L2S2.pm.

You may use MySQLMan to import the emails, but then you still have to set the Status, ReceiveMail, Newsletter, generate a password, and send notify emails to all newly generated users.

Other solution is to create a fake links.db, with only the necessary data, including the emails.
Then install a new LinksSQL copy, then try out to import that fake links.db.

That was just a few ideas, but I'm not the one who will help you in that import problem, since I'm really busy now. I just gave you some ideas. You may want ask somebody to write an import script for you. You may ask Paul (or other experts), if he has time to do it.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] step by step import ??? In reply to
txs for your help...

I was thinking of something like this :

INSERT INTO links_Users (Username,Password,Email,Name,Validation,Status,ReceiveMail,Newsletter) VALUES('email1@email.com','password1','email1@email.com',NULL,NULL,'Validated','Yes','Yes');
.
.
.
INSERT INTO links_Users (Username,Password,Email,Name,Validation,Status,ReceiveMail,Newsletter) VALUES('email2000@email.com','password2000','email2000@email.com',NULL,NULL,'Validated','Yes','Yes');


Do you think there are other elements I have to take in count?



Txs
Quote Reply
Re: [fmp] step by step import ??? In reply to
Yes, this aproach seems fine as long you generate somehow the sql statements for all emails.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...