![]() |
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: |
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:
|
and how would I change it in php?
$DB_site => query (... *clueless...* but can prolly figure it out. :) thanx. |
Quote:
|
so, I'd just do
PHP Code:
|
Quote:
PHP Code:
|
I'm trying to change $bbuserinfo['myvar']
|
Permanently in the database, or only when the script is processed?
Doing: PHP Code:
PHP Code:
|
Quote:
PHP Code:
right? |
Yes.
|
All times are GMT. The time now is 07:02 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:
|