1
tatane
Update request notify_method
  • 2013/8/7 9:55

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


Hello
In the users table, there requête notify_method that lets you choose the method of notification.

0 = disable
1 = mp
2 = by email

I would put the value 2 to all my former members.

What I have to write sql query for update?

thank you

2
mjoel
Re: Update request notify_method
  • 2013/8/7 11:42

  • mjoel

  • Quite a regular

  • Posts: 325

  • Since: 2006/12/9


UPDATE `xxxx_users` SET `notify_mode`=2;

change xxxx to your database prefix

3
Mamba
Re: Update request notify_method
  • 2013/8/7 11:59

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


The question is: how do you define your "former" members.

For a query, just run a Google search for something like "mysql change data in field on condition" and you'll find answers like this, which recommends this SQL command to be executed in phpMyAdmin:

UPDATE my_table SET my_column='new value' WHERE something='some value';


which you'll need to adjust for XOOPS to something like:

UPDATE xxx_users SET notify_method=2 WHERE something='some value';


the "WHERE something='some value'" would be your definition of what the "former members" mean
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

4
tatane
Re: Update request notify_method
  • 2013/8/7 12:35

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


Quote:

mjoel wrote:
UPDATE `xxxx_users` SET `notify_mode`=2;

change xxxx to your database prefix


I did a test in local.I add this

Resized Image


But I always 0

Resized Image


Here is the query when I validate manually
UPDATE `256`.`x60a_usersSET `notify_method` = '2' WHERE `x60a_users`.`uid` =474;

5
tatane
Re: Update request notify_method
  • 2013/8/7 13:53

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


I add

UPDATE `256`.`x60a_usersSET `notify_method` = '2' WHERE `x60a_users`.`notify_method` = OR `x60a_users`.`notify_method` = 1;


And this work :)

6
Mamba
Re: Update request notify_method
  • 2013/8/7 16:17

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I am confused!

You said that :
Quote:
I would put the value 2 to all my former members.

which would indicated that the "current" members are different.

What you did obviously, was update ALL members to 2. Is this correct?

Then why did you say that this is only for "former" members?

If you wanted to set all users to 2, then this post would be helpful to you...
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

7
tatane
Re: Update request notify_method
  • 2013/8/7 16:22

  • tatane

  • Just can't stay away

  • Posts: 649

  • Since: 2008/5/6 1


Quote:

Mamba wrote:
Then why did you say that this is only for "former" members?


For 2005, I put the choice of mp for registration but I removed this option a few months ago

8
Mamba
Re: Update request notify_method
  • 2013/8/7 16:27

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Then you need to say that you want ALL of your users to be set to "2"
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

269 user(s) are online (181 user(s) are browsing Support Forums)


Members: 0


Guests: 269


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits