Bulk Subscribe [message #26719] |
Fri, 05 August 2005 16:00 |
jhogue
Messages: 28 Registered: April 2005 Location: at the computer
Karma: 0
|
Junior Member |
|
|
I have a few hundred users. We want to subscribe them to our main forum/mailing list in bulk, rather than having to teach them do it themselves.
So, I think I need to create entries the fud_forum_notify table.
1) is it safe to delete the few subcriptions I have by merely deleting the row for its association in the fud_forum_notify table?
2) is it ok to create subscriptions simply by creating a new entry in the fud_forum_notify table?
the logic is like this, but I know the proper commands.
get a list of ids from fud_users id column
for each fud_user id
insert fud_forum_notify set user_id = fud_user.id, set forum_id=5
-- or extracting a list or user ids into a temporary table, setting all forum_ids to 5, then appending? those records.
-J
|
|
|
Re: Bulk Subscribe [message #26737 is a reply to message #26719] |
Mon, 08 August 2005 02:28 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Replies:
1) Yes, it is completely safe.
2) Yes.
INSERT INTO fud_forum_notify (user_id,forum_id) SELECT id, 5 FROM fud_users;
FUDforum Core Developer
|
|
|
Re: Bulk Subscribe [message #26759 is a reply to message #26737] |
Tue, 09 August 2005 23:59 |
jhogue
Messages: 28 Registered: April 2005 Location: at the computer
Karma: 0
|
Junior Member |
|
|
Thanks!
Works like a charm.
If you know the forum id of the forum you want to bulk subcribe people to, and be sure to get your table names correct. (prefix will differ from mine, ie: fud32_users)
Also, doing this subscribes anonymous (user id #1). I just took that entry out of the notify table.
Jeff
|
|
|