Getting email addresses from database with phpmyadmin

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
redsy1234
Registered User
Posts: 42
Joined: Wed Aug 04, 2010 8:12 am

Getting email addresses from database with phpmyadmin

Post by redsy1234 » Wed Apr 06, 2011 12:07 pm

Hi

I have been reading past threads into extracting email addresses and have tried a number of the SQL queries

such as

Code: Select all

SELECT username, user_email FROM phpbb_users
It is only returning a few results and hardly any with email adresses. I would like all emails, but not bots if possible. What am i doing wrong?

I am not the greatest with phpmyadmin, so please go easy on me :)

I am running 3.08, many thanks

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50812
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Getting email addresses from database with phpmyadmin

Post by stevemaury » Wed Apr 06, 2011 12:13 pm

Code: Select all

SELECT username, user_email FROM phpbb_users WHERE user_type <> 2;
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

redsy1234
Registered User
Posts: 42
Joined: Wed Aug 04, 2010 8:12 am

Re: Getting email addresses from database with phpmyadmin

Post by redsy1234 » Wed Apr 06, 2011 12:16 pm

stevemaury wrote:

Code: Select all

SELECT username, user_email FROM phpbb_users WHERE user_type <> 2;
Thanks for quick reply. I get 2 results, one an admin, and one a test account i set up. I have alot more users with emails :?:

I am simply running the query in the main database section under SQL on phpmyadmin.

The top section says the following once the results are displayed

Code: Select all

SELECT username, user_email
FROM phpbb_users
WHERE user_type & lt ; & gt;

2;
Last edited by redsy1234 on Wed Apr 06, 2011 12:27 pm, edited 1 time in total.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50812
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Getting email addresses from database with phpmyadmin

Post by stevemaury » Wed Apr 06, 2011 12:27 pm

I don't know what "the top section" is. Just paste the exact code I gave you into the box you get when you click the SQL tab and click Go.

Are you sure your table prefix is phpbb_?

Also, try this (although the first should work).

Code: Select all

SELECT username, user_email FROM phpbb_users WHERE user_type != 2;
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

redsy1234
Registered User
Posts: 42
Joined: Wed Aug 04, 2010 8:12 am

Re: Getting email addresses from database with phpmyadmin

Post by redsy1234 » Wed Apr 06, 2011 12:41 pm

In the DB i can see 2 prefixes, phpbb_ and also phpbb2_
I ran

Code: Select all

SELECT username, user_email FROM phpbb_users WHERE user_type != 2;
I get 2 results, one an admin acc, and a test accounts

Code: Select all

SELECT username, user_email FROM phpbb2_users WHERE user_type != 2;
I now get the full listing of all emails over a number of pages. Thanks :)

Why do i have 2 tables? phpbb- and phpbb2 any ideas?
Main users seem to be in phpbb2_

Lastly, how do i export to CSV so the emails and names are in seperate cells of the spreadsheet?
(edit : export in CSV for MS Excel, worked just fine)

Many thanks Steve, it is much appreciated

Locked

Return to “[3.0.x] Support Forum”