Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    New Jersey

    Unanswered: Creating user-defined units of measurement..

    revised posting - see below next post
    Last edited by phpPete; 08-31-02 at 11:11.

  2. #2
    Join Date
    Feb 2002
    New Jersey
    To clarify somewhat:

    Here's what I'm trying to develop:


    A script to allow the user to define a custom unit of measurement,
    to be associated with the ingredient the user is working with at that
    moment, and equating to another amount of another ingredient.

    Any custom conversion name may be used multiple times for
    separate definitions

    So a custom conversion named "Hat" when defined while working
    with ground beef, is set to equal some arbitrary amount of something
    else. Thus the user may define a new unit of measure using the same name
    ( "Hat" ) to be tied to some other ingredient. So, whenever the user
    chooses "Hat" of ground beef it's different than "Hat" of avocado.

    The system would then check that whenever "Hat" is chosen that "Hat":

    a) is defined for the ingredient the user selected
    b) choose the proper definition for the ingredient
    c) make calculations based on the chosen definition

    Sample DB Tables are units, equivalence, ingredient_association )
    Table name == units ( record one )
    unit_id                  001
    unit_name            Schmear
    unit_description     thin spread
    Table name == units ( record two )
    unit_id                   002
    unit_name             ounce
    unit_description     1/16th of a pound
    Table name == equivalence
    equiv_id            001
    unit1_id             001
    unit2_id             002
    bind_to              cream cheese // the ingredient "in focus" when unit is defined 
    multiplier           2
    The desired effect being:

    one schmear is equal to 2 ounce cream cheese:

Posting Permissions

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