I have a column of type SET with a list of variables. I know that SET is based on a list and saved as a binary, or something of the sort. I can update the list using a decimal (3 means the first and second item, 7 means the first, second, and third item, etc.) however I want to select the data in the same way so I can do a binary conversion on it later (ex.
if($data & 2)) but I don't want to have to convert it with PHP.
Basically, I want to grab a row from the database, and if the column type is SET, then I want the value of that column to be in decimal form of the data. Any tips?
If I can do it by the column type being SET rather than specifying each name that would be great as well, but it's not that important.