Jump to content

[SOLVED] 0 is false; 1 is true; What about Yes/No/Null?


cunoodle2

Recommended Posts

I have data that I need to store for a few different items.

 

I WAS just going to use 0 for no and 1 for yes (same as true/false) but then I realized that I also have to have an "empty" or "Null" value.

 

I can't just use 0,1 and NULL because I retrieve the intval() of the item and intval(NULL) returns 0.

 

Is there a rule/set of numbers defined for empty,no,yes?  I was going go use 0,1,2 respectively but wasn't sure if there was like a standard rule like true/false.  Anyone have any input on this?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.