[eluser]NateL[/eluser]
In a lot of applications, things that are user submitted are often held in a moderation queue.
It's displayed publicly when the status of the content has been set to 'Approved'
If I have a table in my database named "posts" with a column called "status", and I have various different statuses - Approved, Pending Approval, Rejected, etc....and I want to pull all of the contents that are "Approved", is it better to have each status represented as an integer?
In other words, is it OK to run a query like this:
Code:
SELECT * FROM posts WHERE status = 'approved';
Or, is it better to have the status represented as a number, like so:
1 - Approved
2 - Pending Approval
3 - Rejected
Code:
SELECT * FROM posts WHERE status = 1;
Thanks