[thelist] PHP/MSQL question millions or thousands
Fred Jones
fredthejonester at gmail.com
Wed Feb 6 12:09:14 CST 2008
>> Salt – to taste
>> Generous pinch of salt
>> Red Chili Powder – to taste, optional
>> 1/4 medium Onion, finely chopped
>> Lemon OR Lime Juice – 1/2 tsp
>> Cilantro – 5 springs, finely chopped
>> Papads – 2, any flavor
>> 1/2 lb. thin bacon chopped
>>
>> It would be tough to handle all this in a non-painful way on the UI
>> side if you had a rigid database structure like that, I would think.
>
> pffttt, you aren't trying hard enough
>
> INGREDIENT(FK) QTY DESCR
> Salt To taste
> Salt Generous pinch
> Chili Powder, Red To taste Optional
> Onion 1/4 medium Finely chopped
> Juice, Lemon/Lime 1/2 tsp
> Cilantro 5 sprigs Finely chopped
> Papads 2 Any flavor
> Bacon 1/2 lb. Thin, chopped
>
> the important part in this example is the FK
You wouldn't want to also FK the qty, as in a number (like 1 or .25) and
then the units (like pinch or cup) so that then recipes could
automatically be doubled/halved by the code?
Fred
More information about the thelist
mailing list