![]() |
SQL Query - Change Last Activity Date
My forum was imported from another system. All user that have NOT logged in since the change over have a last activity date that is blank. In addition the "Receive Admin Emails" is unchecked.
I would like to run a couple of query's. One: If the last activity is blank THEN set receive admin emails to YES Two: Set last activity to a date so it isn't blank. I am using a plugin that sends reminder emails to in inactive users and they are being left out because of the no date issue. Can anyone help? Thanks! |
Try this:
Code:
UPDATE user SET options = options + 16 WHERE lastactivity = 0 AND NOT (options & 16) and Code:
UPDATE user SET lastactivity=UNIX_TIMESTAMP('2012-01-01 15:30:00') WHERE lastactivity = 0 Of course you can set the date and time to whatever you want. |
That worked perfectly. Thank You!!
|
All times are GMT. The time now is 03:26 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|