How to show Record was "Approved"?

My website allows registered Members to add Comments to my Articles. However, before a Comment will appear, it has to be approved by me.

What is the best way to let my PHP code know that a Comment is ready to be displayed?

Currently, I have a VARCHAR(20) field where I have either “Approved” or “Pending” and my queries say…


WHERE status='Approved';

However, I also have a field called approved_on which is a DATETIME and allows Nulls.

Would it be easier to lose the status field and just run my queries like this…


WHERE approved_on IS NOT NULL

(or whatever the proper syntax is?!)

Is it bad to have a field that is full of Nulls like that?

Debbie

i expect you’ll get a better answer in the php forum

yes

absolutely not

But can I lose the status field and just look in the approved_on for a DATETIME value (i.e. not null), thus signifying that the Comment was approved?

Like this…


WHERE approved_on IS NOT NULL

Debbie

yes

lose the status field

Okay, that is easier.

Thanks,

Debbie