URGENT : How to only display if variable is met ? (CRUD)


I am quite new to yii and am wondering how i would only display the database rows if a variable is met.

I am creating a room booking system and i have a model named Bookings. This is populated with over 400 records that have two fields (Day and Week) if the day = the day in the row then show that row. So when the table or bookings are listed only show the ones for today, same with week if the week is odd then show the ones that have Week=1 and if it is even Week=2.


Spark Internet Services

You can do this e.g. by providing a condition-parameter to the findAll()-function when getting the list of bookings.