![]() |
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 |
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 |
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 |
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` |
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? |
I think it's just a Unix timestamp. Try this
Code:
date('m/d/Y', $joindate); |
Thats works for me. Tx Analogpoint ...
|
You're welcome.
|
All times are GMT. The time now is 11:53 PM. |
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:
|