The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
What field/table has the values for "Receive Email From Administartors"
Hi All,
What field and table stores the value "Receive Email from Administrators" in the vbulletin database? I tried looking at the user table, there was one field called "autosubscribe". I am not sure if thats the one Tx in advance |
#2
|
||||
|
||||
It's in the options field of the user table.
To turn it on (where X is the user id that you want to change): Code:
UPDATE user SET options = options + 16 WHERE NOT (options & 16) AND userid = X LIMIT 1 Code:
UPDATE user SET options = options - 16 WHERE (options & 16) AND userid = X LIMIT 1 |
#3
|
|||
|
|||
Hi analogpoint,
Tx for helping me out the last couple of days. Why are you doing (options + 16) When I fired a query on the database, the options field show me a 4 digit number. Like 3143, 3159. Is there a reference table that has a desc for these numeric values? My goal is to fire a query that will show me the number of users who have "checked" or "Not Checked" the option for "Receive Email from Administrators" during a registration process. tx |
#4
|
||||
|
||||
You're welcome
Those options are a bitfield, so it can store many options in a single int field in the database. Code:
SELECT userid, username, IF(options & 16, 1, 0) as acceptsadminemail FROM `user` |
#5
|
|||
|
|||
Thats awesome. Tx so much.
One last question. joindate. I see it stored as something like this "1186389780" What is this date format and how I can I see its as say "mm/dd/yyyy" I tried firing a sql statement like this: Select DATE_FORMAT(joindate, '%M %e, %Y, %l:%i%p') as joindate, email, username, password, birthday, IF(options & 16, 1, 0) as acceptsadminemail from user But the join date returns as null What am I doing wrong? |
#6
|
||||
|
||||
I think it's just a Unix timestamp. Try this
Code:
date('m/d/Y', $joindate); |
#7
|
|||
|
|||
Thats works for me. Tx Analogpoint ...
|
#8
|
||||
|
||||
You're welcome.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|