![]() |
MySQL query to find users who don't want email
I'm looking to update the below mysql query to look at the "receive admin email" setting in vbulletin, and only select those that are set to YES.
PHP Code:
I *think* it should be something like this (I added AND userfield." . $vbulletin->options['16'] . ") ) PHP Code:
Does that seem right? |
I think you want to add
Code:
AND (user.options & " . $vbulletin->bf_misc_useroptions['adminemail'] . ") ETA: you'd also need to add user.options to the list of fields being selected. |
Thanks kh99. I'm not great with mysql (it's easy to get lost with the " ' ), etc). Does this look right:
PHP Code:
|
I have trouble sorting out that stuff just by looking at it, but I think you have one extra double quote char before the AND you added.
|
I ended up getting this code to work. I can't say that I really understand it though
Code:
// Get Members this was the line that did the heavy lifting: Code:
" . iif(!$vbulletin->GPC['user']['adminemail'], " AND (options & " . $vbulletin->bf_misc_useroptions['adminemail'] . ")") . " Do you guys see any problems with this code? |
All times are GMT. The time now is 09:35 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:
|