php - Showing Featured Item From the Database -
i have database table below. id, bungalow_name, type, address, featured a bungalow can featured in home page. if bungalow featured, featured column has value 1 . have 50 bungalows in tables , 5-7 bungalows featured @ given time. let's assume featured bungalow names below. bungalow 1, bungalow 2, bungalow 3, .........., bungalow 6 what i'm trying show featured bungalow in home page each day. , want loop below below each month. given don't want show bungalow randomly each page load. want show per day 1 bungalow basis. today -> bungalow 1 tomorrow -> bungalow 2 day after tomorrow -> bungalow 3 ... after bungalow 6, bungalow 1 shown on next day. how can it? possible sql/php? you use mysql query: select * bungalows id = ( select b1.id bungalows b1 left join bungalows b2 on b1.id>b2.id , b2.featured=1 b1.featured=1 group b1.id having count(b2.id) = (select datedif...