This is a follow up from a previous thread. In that thread I asked "how do I calculate the set column decimal value based on 1,2,3, etc?" Now for the inverse question:
How do I check to see if a $part decimal equivelent (i.e. part 1 = 1, part 2 = 2, part 3 = 4) is in the mysql result for that row?
I know I can use a strpos() on the part name but I want to avoid using this if there is a mathematical (and presumably faster) way of doing it.
OK so I retreive from the database the set column as set_col + 0, so I get the decimal value of the column. Let me just make this into an example:
part 1 --> "username" --> dec. value 1
part 2 --> "basic_info" --> dec. value 2
part 3 --> "shipping_etc" --> dec. value 4
Let's say the set column for this row has a value of "username, basic_info" and therefore a dec. value of 3. OK, in my loop as I cycle through the part numbers, let's say I am on the iteration part 2. Is there a mathematical way of "seeing" if part 2 (with a dec. value of 2) is IN THE MYSQL RETURNED VALUE OF 3??