Menu
In a db is using a boolean field more efficient that using a char field with one chracter as an
indicator flag ?
This is especially relevent when I only have two options “yes or no”.
eg. if I use a single char field callad flag1, I can put a “y” in it and test it
with a WHERE eg
$sql = “SELECT * FROM stuff WHERE flag1 =”y”
IF I used a boolean field – lets say flag2, and set it to true ( how do I do that ?)
How do I test it in the WHERE statement ?
$sql = “SELECT * FROM stuff WHERE flag2 ???
Anyway – if I do this is it somehow better or more efficient ?
Thanks – you can guess that I haven’t used bool. values much !