Searching Algorithm Help Needed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ralph Freshour

    #1

    Searching Algorithm Help Needed

    I'm developing a database for a research firm which has data they want
    to search for specific criteria against varying base line data - some
    of the questions that have been asked to get the raw data (which I
    will import into MySQL) are like this:

    how often do you use mouthwash?
    etc.
    etc.

    The responses for each question was structured with only 4 answers
    from a large group of people:
    no answer
    low
    medium
    high

    Using various baselines of people, I want to build a query that will
    accurately find matches and to also allow me to find 'close' matches
    - for example:

    if base line #1 is for a consumer who uses mouthwash a 'medium' amount
    of times per week, I want to find in the database how many 'hits'
    there are for that question - but I also want to capture 'close' hits
    like in this example, for this specific question, if the search finds
    'low' instead of 'medium' I'd like to count that as a 'close' hit vs a
    direct hit (match) - then when the query is over, I'd have say, 80%
    matches with (for example) 60% of those direct hits and 20% close
    hits - I'm using PHP so I can use that to keep track of direct hits
    and 'close' hits.

    Am I on the right track here or is there a better or easier way to be
    doing this? I hope I've explained this clearly enough!

    Thanks...

Working...