Re: best way to stare true, false

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: best way to stare true, false
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21106@lists.php.net to get a copy of this message
The smallest amount of database storage is going to be with a TinyInt and if you set up two constants to represent TRUE and FALSE then all your code will read correctly and will store correctly. EG: define("TRUE", 1); define("FALSE", 0); now you can use TRUE and FALSE in your program where you would use any variable (just don't use a dollar sign in front of them). This will make your code much easier to read in the long run. Plus, if you create a 'master global' file with all of your custom routines that you use in all programs, you could have these globals there as well avaialable to all your programs without thinking about it again. Remember, keep your code readable, runable and reusable! Jim Hunter Diamond Computing -------Original Message------- From: andy Date: Saturday, August 10, 2002 07:40:19 AM To: php-db@lists.php.net Subject: [PHP-DB] best way to stare true, false Hi there, I am searching for the best way to store true or false inside a MySQL DB. With best I mean the most data efficient way and in the same time the best for fast searching later on the table to find all which are false, or true. I think I did read something about a way to do this with ENUM, but cant remember where and how, all tryes did not succeeed so far. Thanx for any help on that. Andy -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php .

« previous php.db (#21106) next »