The key to this is going to be getting your db design sorted.
You should use a model similar to the text for CRONs using a series of switches in your db table. It means that you have lots of empty fields for most entries, but because they are CHAR(1) fields it won't be a problem.
To give you an idea -
| Mon | Tue | Wed | Thu | Fri | Sat | Sun | Start | End |
|-----+-----+-----+-----+-----+-----+-----+-------+-----|
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | | |
This would represent something that shows for every Monday with no end date set.
| Mon | Tue | Wed | Thu | Fri | Sat | Sun | Start | End |
|-----+-----+-----+-----+-----+-----+-----+-------+-----|
| 1 | 1 | 1 | 1 | 1 | 0 | 0 | | |
This would represent something that shows for every weekday with no end date set.
This is obviously an overly simplified example but hopefully you can see where I'm heading with it. Have a go and see how you get on.
Hope this helps