• 0

What would be the best way to do achieve the following functionality


Question

I have a database with about 1600 entries, each relating to a different company. There are 3 fields so far; Reg Number, Company name, and County.

Step 1 - I would like my guests to be able to select a particular company from the 1600. So some tips of filtering/sorting with such a large database would be appreciated?

Step 2 ? once the user has located their company, I want them to be able to add their vote to show their dissatisfaction with them.

Step 3 ? I would like the to be able to display the top 10 worst companies in a poll format on my homepage.

So, how would one go about achieving this?

Many thanks

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Table of countries with an ID

Table of companies with an ID and also a countryID relating to the countries table

Table of votes against a company, linking by companyID on the previous table

Note, accept only 1 vote per IP/user for each company?

Link to comment
Share on other sites

  • 0

Sorry, im new to all of this, please spell it out to me!

I currently have only 1 table, which as discussed, has three fields. Are you saying i should actually have 3 seperate tables now?

will i need some 3rd party poll script too?

thanks

Link to comment
Share on other sites

  • 0

tblCountries

- ID

- Country

tblCompany

- ID

- Name

- CountryID (Links to tblCountries.ID)

tblVotes

- ID

- IP or User

- CompanyID (Links to tblCompany.ID)

- Vote

- Reason

^ The set-up I gather from njlouch, which makes sense, it's called normalisation. Filtering is easier done with ID's (numerical values/unique keys) than with names. Also 1600 records is a tiny database, filtering it with certain criteria if you're using a layout similar to that above should pretty much be instant.

Link to comment
Share on other sites

  • 0

sorry, i meant to say 16,000. perhaps it is still small though! i dunno..

Excellent, defo something for me to be crackin on with... i like a challenge

Link to comment
Share on other sites

  • 0

I'm guessing this is a school/personal project? Well if you need any further help/advice just ask.

Absolutely not mate. I have done my time at school/uni!. This is a little personal project of mine. I recently finished my other sideline (photography website) and so have time for my other little project.

I like to learn, which is why I subscribed to Lynda.com, some time ago to build on my basic understanding of web design. Howver, there are things not covered that in these tutorials that I need to understand.

To be honest, if there was some sort of Dreamweaver extension that could do it for me, then I would do it that way?there isn?t is there? 

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.