Advertisement:

How to export the email addresses from a particular membergroup?

Aloittaja aksal, toukokuu 12, 2019, 06:16:24 IP

« edellinen - seuraava »

aksal

What query do I want to run to export the email addresses from a particular membergroup?
I use SMF 2.0.15
Thank you.

Oldiesmann

Michael Eshom
Christian Metal Fans

vbgamer45

You would need to run an sql query via phpmyadmin or another tool from the smf_members table where id_group = group id you need
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Illori

what is the reason you want to export their email addresses? if it is to send an email to them you can do that using the newsletter function.

aksal

Lainaus käyttäjältä: Illori - toukokuu 13, 2019, 06:30:12 IP
what is the reason you want to export their email addresses? if it is to send an email to them you can do that using the newsletter function.

It takes like forever if I use the build in Newsletter function because I have a lot of users. That's why I need to export the addresses and use an external tool for sending emails.

aksal

Lainaus käyttäjältä: vbgamer45 - toukokuu 13, 2019, 05:59:12 IP
You would need to run an sql query via phpmyadmin or another tool from the smf_members table where id_group = group id you need

What would be the right query for this?
Thanks

vbgamer45

select email_address from smf_members where id_group = ###
### replace with group id
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Oldiesmann

Might want to change that last part to "id_group = ### OR FIND_IN_SET(###, additional_groups)" to catch any members who are in that group but don't have it as their primary group.
Michael Eshom
Christian Metal Fans

aksal

Lainaus käyttäjältä: vbgamer45 - toukokuu 13, 2019, 10:33:39 IP
select email_address from smf_members where id_group = ###
### replace with group id

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0005 seconds.)

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

aksal

Thank you guys, but still nothing.
I tried with
select email_address from smf_members where id_group = 7 OR FIND_IN_SET(7, additional_groups)
And with
select email_address from smf_members where id_group = 7 OR FIND_IN_SET(4, additional_groups)
and I get this again and again
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0431 seconds.)

Sir Osis of Liver

You'll get an empty result if id_group is not a valid membergroup.
When in Emor, do as the Snamors.
                              - D. Lister

Arantor

And those ids look like post count groups... are they post count groups?
Holder of controversial views, all of which my own.


Biology Forums

Posting just to bookmark the topic. Good question and great answers!

aksal


Arantor

Would have been nice to know this, since not knowing this wasted everyone's time thus far.

select email_address from smf_members where id_post_group = 7
Holder of controversial views, all of which my own.


m4z

#16
How/why should a user  or casual admin know there's a difference between postcount-based and normal groups?
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

Arantor

Because they don't act like other groups. Also, it's just courteous to provide as much information up front rather than having to pull it out later.
Holder of controversial views, all of which my own.


aksal

Lainaus käyttäjältä: Arantor - toukokuu 29, 2019, 07:38:16 AP
Would have been nice to know this, since not knowing this wasted everyone's time thus far.

select email_address from smf_members where id_post_group = 7

It worked perfectly now. Thank you very much.

Advertisement: