NYCPHP Meetup

NYPHP.org

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

Peter Simard peter at panvox.net
Thu Jul 18 12:25:37 EDT 2002


My initial attempt a few days ago resembles Patricks' suggestion:
CREATE TABLE custom_conversion (
   custom_id int(11) NOT NULL auto_increment,
   custom_name varchar(15) NOT NULL,
   custom_amt double DEFAULT '0' NOT NULL,
   custom_conv double DEFAULT '0' NOT NULL,
   custom_type varchar(15) NOT NULL,
   parent_amt double DEFAULT '0' NOT NULL,
   parent_conv double DEFAULT '0' NOT NULL,
   parent_type varchar(15) NOT NULL,
   PRIMARY KEY (custom_id)
);


however the "mulltiplier" idea never occured to me...

Either way I think i'm getting a clearer picture now...

any more suggestions feel free to add them!!

if you like feel free to check out how the user would to define their
conversions here:

http://www.mainstreetsrestaurantgroup.com/msc/conversionBuilder.php



----- Original Message -----
From: "Fee, Patrick J" <patrick.fee at baesystems.com>
To: "NYPHP Talk" <talk at nyphp.org>
Sent: Thursday, July 18, 2002 12:00 PM
Subject: RE: [nycphp-talk] War & Peace...abridged version..


> Perhaps this idea would work...
>
> Couldn't you simply create a "conversion table".
>
> This table would then allow you to keep the new item (e.g. shmear), a
> multiplier (e.g. 2) and a field that has a one-to-one relationship with
> items in your measurements table (e.g. ounce).
>
> That way, you could set up a form that would allow him to make a new
> conversion item (force it to be unique) like "jigger".  He then would put
in
> a multiplier like 3.5 in a text box.  Finally he would select from a drop
> down list the appropriate measurement, perhaps ounces.
>
> Now, anywhere else in the application, you can show a jigger as 3.5oz.
>
> You'll have to allow for the plural when listing it (e.g. the table might
> show "ounce" but a "jigger" would need to show "ounces"), but I think it
> could work with a relational DB behind you.
>
> Patrick J. Fee
> Web & Database Manager
> BAE SYSTEMS
> 600 Maryland Ave. SW  Suite 600
> Washington D.C. 20024
> Patrick.Fee at BAESYSTEMS.com
> Tel: (202) 548-3759
> Fax: (202) 608-5970
>
>
>
> -----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