The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help with a query :(
So I'm trying to write a small php file that'll more or less optimize someones vb settings for highspeed or dialup.
Turning off signatures, avatars, img code and the like, or alternately turning it on. Then I realized that showsignatures, showavatars and showimages, seemed to be stored in a "binary?" form in the options field of the user table. I am completely stumped on what I can do to do this. I found this query for dst Code:
$DB_site->query(" UPDATE " . TABLE_PREFIX . "user SET options = options - $_USEROPTIONS[dstonoff] WHERE userid = $bbuserinfo[userid] AND (options & $_USEROPTIONS[dstonoff]) "); So I'm sure I could run a variant of that, i.e. useroptions[showsignatures] but if I don't know who has it selected already I'm pretty sure it could really fubar somethings Any ideas? :ermm: |
#2
|
||||
|
||||
actually it should work quite equal:
Code:
$DB_site->query(" UPDATE " . TABLE_PREFIX . "user SET options = options - $_USEROPTIONS[showsignatures] WHERE userid = $bbuserinfo[userid] AND (options & $_USEROPTIONS[showsignatures]) "); and to get the other way round it would be: Code:
$DB_site->query(" UPDATE " . TABLE_PREFIX . "user SET options = options + $_USEROPTIONS[showsignatures] WHERE userid = $bbuserinfo[userid] AND NOT (options & $_USEROPTIONS[showsignatures]) "); |
#3
|
|||
|
|||
Thank you so very much bro, worked like a charm!!!!
|
#4
|
||||
|
||||
you're welcome |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|