SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Mar 2004
    Location
    Fort Lauderdale
    Posts
    522
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb incorporating european measurements

    I have a set of tables:

    Table_1: questions
    Table_2: possible_answers
    Table_3: stored_answers


    So to create a profile for a user, I get the questions from the database, and assign a question possible answers in <select></select> tags, from which the user chooses the answer and it is sent to the database and stored in the "stored_answers" table.

    I have a dillemma with questions that require more than just 1 answer. If I ask a user " how much do you weigh" and I wnat the user to give me a value, but also specify whether it is in kilograms or american lb - i get into problems.

    How can I incorporate different standards for measurements into my tables?

    Thanks

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i get into problems.
    Ok. What sort of problems do you get into?

  3. #3
    SitePoint Wizard silver trophy Jelena's Avatar
    Join Date
    Feb 2005
    Location
    Universum, 3rd Corner
    Posts
    3,001
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Add one more field which will indicate if they chose lb or kg.
    -- Jelena --

  4. #4
    SitePoint Addict Chillijam's Avatar
    Join Date
    Nov 2003
    Location
    England
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd be wary of adding that kind of question, tbh. If you are using it as an added security question, you have to take into account those people (like me) who have no idea what they weigh, and wouyld have to check. It'll probably change each time and therefore not give accurate answers. That's why these kind of questions tend to be First pet's name or partner's name - something static.

    Just a thought.

    To answer your question, why not leave the unit of measure out of the equation? Just have a text box, then the text lbs / kg. That makes the answer a simple numeric one, without having to do lots of extra validation.
    Your mind is like a parachute. It works best when open.
    (HH The Dalai Lama)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •