![]() |
SQL to find visible users (option bit set)
SELECT * from vb_user where....
the option bit for visibility is set. (options & 512)==512 Not sure how to ask for bitwise operator in query... Or maybe there is an easier way to get this info? Please and thank you. |
SELECT username, joindate, options FROM `vb_user` WHERE ( options & 0x0100 ) ORDER BY joindate DESC LIMIT 1
Bingo. Thank me. Finds most recent member who is not invisible. |
Is there any reason why you've used a hex as opposed to a number when checking the bit? I've not seen it done this way before hence I'm curious if there's any advantage :)
|
All times are GMT. The time now is 10:29 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:
|