The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#3
|
|||
|
|||
![]()
Got ya
I created my tables this way Thanks m8 --------------- Added [DATE]1201278626[/DATE] at [TIME]1201278626[/TIME] --------------- One another question about bitmask and bitwise in DB and queries I've multiple status for each entry on the table, such as SHOWN or HIDDEN, PREMIUM or FREE, ... i can add one field for each status, for example 3 TINYINT(1) or BOOL fields [SQL] SELECT * FROM table WHERE `x`=1 AND `y`=0 AND `z`=1 [/SQL] another method in my mind is use one TINYINT filed for all cases INSERT and SELECT rows using AND(&) bit operand for example [SQL] SELECT * FROM table WHERE `status`&5 [/SQL] where 1 stands for x, 2 for y and 4 for z which one is better? is there any difference in performance? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|