PDA

View Full Version : Extract email addresses from DB


Gnappy
05-28-2010, 05:48 PM
Hello guys,
I need to improve my newsletter system due the vb default one is very painful...
So the first step is obtain and collect all the users email addresses from my DB. I thought there was a "simply hack" to do this but after many googling and searching here on vb.org I found NOTHING.

I know I could get them from the DB but for particular reasons I cannot connect to the sql server by remote and, of course, I am not skilled enough to make a query that does a simple list(ehh lol :rolleyes: )..

Can someone help me? Any kind of help will be very appreciated!

--------------- Added 1275072902 at 1275072902 ---------------

I think a query like this (http://www.vbulletin.com/forum/showthread.php?187621-extract-info-from-database-profile-fields) could work but my problem of remote connection still exists, so..

SELECT username, email FROM user

borbole
05-28-2010, 05:55 PM
Hello guys,
I need to improve my newsletter system due the vb default one is very painful...
So the first step is obtain and collect all the users email addresses from my DB. I thought there was a "simply hack" to do this but after many googling and searching here on vb.org I found NOTHING.

I know I could get them from the DB but for particular reasons I cannot connect to the sql server by remote and, of course, I am not skilled enough to make a query that does a simple list(ehh lol :rolleyes: )..

Can someone help me? Any kind of help will be very appreciated!

Do you want only the email addresses or the usernames associated with those email addresses as well?

Anyway, to get only the emails run this query at the SQL tab at your phpmyadmin:

SELECT email FROM `user`;

To get the email addresses and the usernames associated with those email addresses, run this query instead:

SELECT email, username FROM `user`;

If your db tables have prefix, include that as in well in the query.

Gnappy
05-28-2010, 06:06 PM
Thanks borbole for your assistance!

To be honest I had already found this kind of solution(at the upper link) but I was concentrated to have the remote mysql access(denied for some reasons).... My solution was clear and veryvery easy:
run that query via acp(Maintenance --> Execute SQL Query)

By the way thanks borbole, I hope this will help others with the same issue :)

borbole
05-28-2010, 06:14 PM
Glad to hear that you got it solved. I forgot totally about the option to run queries from the acp.

terracore
10-09-2010, 07:34 PM
Thanks guys for the posts/thread. It solved my problem.

Gnappy
03-23-2011, 09:37 PM
Hi guys,
sorry for bump again this thread (started by me :)) but I have a question..

I wanna extract from my db just users that have activated its account by email.
I thought to run a query like this:
SELECT username, email FROM user WHERE usergroup_id='2' AND usergroup_id='7' AND ...
or a code like this:
SELECT username, email FROM user, usergroup WHERE usergroup_id='2' AND usergroup_id='7' AND ...
This code is NOT correct but is just to explain my idea, if it's correct..

Sadly I don't know the vbulletin DB diagram (also googled a lot), can someone help me?

Thanks in advance! :)

--------------- Added 1300949738 at 1300949738 ---------------

Up!


It is very strange that none is interested to extract usename and emails fro the DB to make newsletter with an external software. The common documentation about this is strongly poor...