NYCPHP Meetup

NYPHP.org

[nycphp-talk] War & Peace...abridged version..

Lynn, Michael (DCS) MLynn at exchange.ml.com
Thu Jul 18 11:54:12 EDT 2002


Just off the top of my head - I might create something like the following:

Create a couple tables in your database for conversions:

Table: Units
Column: unit_id
Column: unit_name
Column: unit_desc

Table: Equivilence
Column: equiv_id
Column: unit1_id
Column: unit2_id
Column: multiplier

Your equiv table will contain relationship information:
Example

Table: Units
Unit_id: 001
Unit_name: Shmear
Unit_desc: Dollap applied by knifelike utensil.

Table: Units
Unit_id: 002
Unit_name: Oz
Unit_desc: One Ounce

Table: Equivilence
Equiv_id: 0001
Unit1_id: 001
Unit2_id: 002
Multiplier: 2

This example shows that 1 Schmear is equal to 2 Oz's: Unit1 * Multiplier = Unit2.

Just a quick shot at it anyway - good luck!

Mike
-----Original Message-----
From: Peter Simard [mailto:peter at panvox.net] 
Sent: Thursday, July 18, 2002 11:40 AM
To: NYPHP Talk
Subject: [nycphp-talk] War & Peace...abridged version..


Allrighty then...

I have a food-costing application which takes data about a food item: weights, costs, portion size, measurement equivalent, yield.  the end result is that it determines how much it costs to produce a
particular item. Providing the user has kept the net cost current of all ingredients used of course.

My client would like me to develop a form by which he can create his own conversion.

So he'd like to say:
2 ounce = = 1 shmear

and have the system understand what a shmear is actually 2 ounces.

Thus my dilemma...I cn't for the life of me figure this out.

Thanks,

Pete


----- Original Message -----
From: "Analysis & Solutions" <danielc at analysisandsolutions.com>
To: "NYPHP Talk" <talk at nyphp.org>
Sent: Thursday, July 18, 2002 11:25 AM
Subject: Re: [nycphp-talk] Guru or altruistic soul sought...


> On Thu, Jul 18, 2002 at 11:12:45AM -0400, Peter Simard wrote:
> >
> > Rather than go into the gory details here, if someone is curious 
> > about my dilemma they can contact me at peter at panvox.net.
>
> But that's what help lists are for.  The more people that see it, the 
> more people that can help.  Of course, make sure you succinctly and 
> clearly state the situation.  No one want's to read "War and Peace" 
> here.
>
> --Dan
>
> --
>                PHP classes that make web design easier
>         SQL Solution  |   Layout Solution   |  Form Solution
>     sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409
>
>
>







More information about the talk mailing list