muneeba9071
02-16-2009, 02:57 PM
Hi,
I have a field in a database called "status", if the status is 1, this means the item is active, if the status is 0, means the item is cancelled.
Now, everytime I have to mention in each queries, lets say, I want to show all items which are active I do "WHERE status = '1' ", my question is, is there possibility if we could put these restrictions within the database, so by default it shows all the active items... and if I want to see the cancelled items I will have to "WHERE status = '0' "
Thanks!
I have a field in a database called "status", if the status is 1, this means the item is active, if the status is 0, means the item is cancelled.
Now, everytime I have to mention in each queries, lets say, I want to show all items which are active I do "WHERE status = '1' ", my question is, is there possibility if we could put these restrictions within the database, so by default it shows all the active items... and if I want to see the cancelled items I will have to "WHERE status = '0' "
Thanks!