RE: [PHP] Bit-flags in tables?

From: Date: Wed, 11 Jul 2001 16:40:01 +0000
Subject: RE: [PHP] Bit-flags in tables?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57415@lists.php.net to get a copy of this message
On 11-Jul-01 Lasse wrote: > > Ok, after a lot of R'ing TFM, I'm more confused than I was before... Seems > MySQL plays pretty loose with most datatypes and stores half the numeric > types as strings, so > > I want e.g. a 16 bit field where I can use the individual bits for various > flags. How should I set the MySQL datatype and attributes? > SMALLINT UNSIGNED also look at SET > Also, are there any other caveats I should know about? (e.g. PHP's handling > of integers) > 32bit signed (should be ok). > Back in the good ol' 680x0 ASM days this was so easy! :-) M6502, 8080 , sticks & rocks for ones & zeros. Funny, i don't feel like an old fart (yet). Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#57415) next »