On Sun, 26 Jul 2020 11:06:51 +0100 mick crane <mick.cr...@gmail.com> wrote:
> On 2020-07-26 08:54, Joe wrote: > > On Sat, 25 Jul 2020 14:55:35 -0700 > > David Christensen <dpchr...@holgerdanske.com> wrote: > > > >> > >> > >> It's been a while, but Linux-Apache-MySQL-Perl worked for me back > >> in the day: > >> > >> https://en.wikipedia.org/wiki/Lamp_stack > > > > I have a couple of early web applications written in Perl, but then > > I found PHP. There's still no SQL user interface RAD tool like > > Access, which uses SQL internally and externally, and has a lot of > > database design knowledge built into it. > > I'm not very good at this and wondered how to do it and thought could > have things in a hash of hashes. As you tend to stick with a limited > variety of recipes wouldn't be that extensive for personal use. After > sorting out input. I have something over 300 foods in my database, and I'm storing a dozen parameters for each. I also don't want to calculate these parameters for each entry in the journal, just enter the name and weight, that's what joining two tables is for. > > my %food=( > "ham sandwich"=>{ > cal=> .4, > protein=>.2, > fiber=>.3, > }, > "cauliflower cheese"=>{ > cal=> .8, > protein=>.3, > fiber=>.1, > }, > ); > my $calories= $food{$ARGV[0]}{cal}*$ARGV[1]; > > and add it to a weekly and daily totals file. > Yes, though I had the impression the OP was looking for a suitable database to do the job, rather than writing from scratch. I have run web and SQL servers at home for twenty years, doing it the way I did was the obvious route. -- Joe