How to find the best match for a set of options using php/database?

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 2
Joined: Sun Dec 31, 2017 11:57 am

Mon Aug 27, 2018 9:16 pm

Imagine a couple dozen services (sets of options), each of which contains a subset of all available options. I want to create a web form listing all possible options so that users can check the boxes for the options they want, then, after the form is submitted, return a report listing the services from best match to worst.

As an example, consider all the different TV services available- cable, satellite, streaming... how could I setup a page that allows a user to say, "out of 350 channels, these are the 10/20/35 that I actually watch" (check the checkboxes, submit the form, query the database...) then return a list of services that best covers the 10/20/35 specified requirements.

I'm having trouble wrapping my brain around the best way to go about this... how the data/tables would be structured, what the query would look like, etc. If someone could make some suggestions on how to go about this, I would appreciate it.

Post Reply