Asked • 03/19/19

Showing Featured Item From the Database?

I have database table as below. id, bungalow_name, type, address, featured A bungalow can be featured in the home page. If a bungalow is featured, `featured` column has the value `1`. I have 50 bungalows in the tables and 5-7 bungalows are featured at a given time. Let's assume featured bungalow names are as below. bungalow 1, bungalow 2, bungalow 3, .........., bungalow 6 What I'm trying to do is show a featured bungalow in the home page for each day. And I want to loop like below as below for each month. Given that I don't want to show a bungalow randomly for each page load. I want to show per day one bungalow basis. today -> bungalow 1 tomorrow -> bungalow 2 day after tomorrow -> bungalow 3 ... After bungalow 6, bungalow 1 is shown on the next day. How can I do it? Is it even possible with SQL/PHP?

1 Expert Answer


Sam Z. answered • 08/27/20

5 (14)

Full Time Data Analyst at Amazon

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.