Export email addresses from database

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Svensktgolfforum
Registered User
Posts: 7
Joined: Thu Nov 15, 2018 7:54 am

Export email addresses from database

Post by Svensktgolfforum »

I have been able to use this snippet for the last four years, to export my users e-mails. The reason behind it is because I add them to Mailchimp and send them newsletters about the forum.

Code: Select all

SELECT user_email FROM phpbb_users WHERE user_allow_massemail=1
But yesterday I realized that the users that had registered after june/july wasn´t int the exported csv file from when I ran the script above.

Does anyone have a new snippet that works or know why this isn´t working anymore?
Svensktgolfforum
Registered User
Posts: 7
Joined: Thu Nov 15, 2018 7:54 am

Re: Export email addresses from database

Post by Svensktgolfforum »

So something I tried that seemed to work and I want to share is

Code: Select all

SELECT user_email FROM phpbb32_users


I updated the

Code: Select all

FROM phpbb_users
--> to

Code: Select all

FROM phpbb32_users
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72339
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Export email addresses from database

Post by KevC »

That query would be looking at the users from a completely different installation of phpBB as the table prefix is different.
One installation is in a database with tables prefixed with phpbb_ and one with phpbb32_
They are not the same board.

Code: Select all

SELECT user_email FROM phpbb_users WHERE user_type <> 2
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Export email addresses from database

Post by david63 »

Another option is to use this extension - viewtopic.php?f=456&t=2401101
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Svensktgolfforum
Registered User
Posts: 7
Joined: Thu Nov 15, 2018 7:54 am

Re: Export email addresses from database

Post by Svensktgolfforum »

david63 wrote: Thu Nov 15, 2018 9:22 am Another option is to use this extension - viewtopic.php?f=456&t=2401101
Thanks I will look into this one.

One question, the downloaded file was named this, david63-userdetails-3.2 3
Can I upload that entire folder in to root/ext/????
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Export email addresses from database

Post by david63 »

Svensktgolfforum wrote: Thu Nov 15, 2018 10:48 am One question, the downloaded file was named this, david63-userdetails-3.2 3
Can I upload that entire folder in to root/ext/????
It needs to have the structure ext/david63/userdetails/
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Export email addresses from database

Post by warmweer »

Svensktgolfforum wrote: Thu Nov 15, 2018 8:02 am I have been able to use this snippet for the last four years, to export my users e-mails. The reason behind it is because I add them to Mailchimp and send them newsletters about the forum.

Code: Select all

SELECT user_email FROM phpbb_users WHERE user_allow_massemail=1
But yesterday I realized that the users that had registered after june/july wasn´t int the exported csv file from when I ran the script above.

Does anyone have a new snippet that works or know why this isn´t working anymore?
The way I understand your post is that you want to export a list with username and user_email. What's preventing you from exporting that data from the users_table (and even exporting other data from other tables in order to perform queries).

Perhaps no user registered after June/July has allowed massemail?
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
Svensktgolfforum
Registered User
Posts: 7
Joined: Thu Nov 15, 2018 7:54 am

Re: Export email addresses from database

Post by Svensktgolfforum »

david63 wrote: Thu Nov 15, 2018 10:54 am
Svensktgolfforum wrote: Thu Nov 15, 2018 10:48 am One question, the downloaded file was named this, david63-userdetails-3.2 3
Can I upload that entire folder in to root/ext/????
It needs to have the structure ext/david63/userdetails/
I managed to install it now and THANK YOU MISTER! What a masterpiece of extension. Love it. It will be extremely helpful to me.

I need to keep on exploring extension.
Post Reply

Return to “[3.2.x] Support Forum”