Selecting items from a table to feature


I’ve created a basic property listing form, with linked mysql database, for an estate agent, for them to keep track of their listings.

They’d now like to be able to have the option, when going to edit any particular property, to tick a box and have it “feature” on the homepage of their site, as a “featured property”. They’d like to have the choice to have just one property or a number of properties as “featured”, which will load in random order on each load of the homepage.

I’m having some problems deciding how to modify the database, to allow this to happen.

Should I create a new table within the database, which will be queried and have one of its contents randomly pulled onto the homepage as the “featured property” with each page load, or should I create a new field in the main “sales_properties” table called “featured”? and somehow query it that way?

Naturally, the “featured” property on the homepage will need to be clicked on (probably via a “More info…” style link) to take the website visitor to that property’s full details, pictures, etc.

Any assistance would be really appreciated as I’m a little stuck on this! :goof:

Thanks in advance guys and gals :slight_smile:


answered in this thread