I have a table in database which has description of all the statuses
that an account can have and their flag values, like 0 means unapproved,
1 meanns approved, 3 means suspended and so on. Now, when I am inserting
an account record or updating then how do I get the value from this
status table if I want flag value for apprroved or suspended etc.?
Basically, how do I know that I have to set flag to 0, 1 or 2 for
approved?
From what I can gather it sounds like you have a user table that might
look like this. Of course it could have a lot more columns as
well…but these are the ones you seem to be dealing with.
this status could be 0 for pending, 1 for approved, 2 for hold etc.
And there is another table as statuses:
id
value
desc
with row data as :
1,0,Pending
2,1,Approved
3,2,Hold
…
Now how do I use this status table if I want to create an user record
with approved status?
kinneyjd wrote:
From what I can gather it sounds like you have a user table that might
look like this. Of course it could have a lot more columns as
well…but these are the ones you seem to be dealing with.