The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Table User
Okay, i'm not very good at mySQL, which Is why I'm asking this:
First off, what do all the Tinyint, null, etc things mean? Second, Let's say I wanted to add a field to the table User, containing an on or off value, how would I do that? And, once that was done, how would I use php to check if it's "on" or "off", and to change it to "on" or "off"? ... :cross-eyed: |
#2
|
|||
|
|||
TINYINT is a datatype like long, int, String, etc.
NULL means literally "nothing." [sql] ALTER TABLE user ADD yourfield TINYINT(1) NOT NULL DEFAULT 0; [/sql] PHP Code:
|
#3
|
||||
|
||||
and how would I change it in php?
$DB_site => query (... *clueless...* but can prolly figure it out. thanx. |
#4
|
||||
|
||||
Quote:
|
#5
|
||||
|
||||
so, I'd just do
PHP Code:
|
#6
|
||||
|
||||
Quote:
PHP Code:
|
#7
|
||||
|
||||
I'm trying to change $bbuserinfo['myvar']
|
#8
|
||||
|
||||
Permanently in the database, or only when the script is processed?
Doing: PHP Code:
PHP Code:
|
#9
|
||||
|
||||
Quote:
PHP Code:
right? |
#10
|
||||
|
||||
Yes.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|