Re: Updating old code for new engine

From: Bob McConnell <rmcconne(at)lightlink(dot)com>
To: pgsql-novice mailing list <pgsql-novice(at)postgresql(dot)org>
Cc: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
Subject: Re: Updating old code for new engine
Date: 2007-03-31 23:07:38
Message-ID: 460EE9BA.1080909@lightlink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sean Davis wrote:
> Bob McConnell wrote:
>> Good morning,
>>
>>
>> The first level errors I get are:
>>
>> SELECT count(*) FROM recipe_recipes WHERE recipe_name LIKE 'A%' OR
>> recipe_name LIKE 'a%' ORDER BY recipe_name
>> ERROR: column "recipe_recipes.recipe_name" must appear in the GROUP BY
>> clause or be used in an aggregate function
>>
> I'm not sure, but I don't think the statement was ever correct SQL. In
> any case, you would need to add a GROUP BY clause.
>> SELECT recipe_id,recipe_name FROM recipe_recipes WHERE recipe_name
>> LIKE 'A%' OR recipe_name LIKE 'a%' ORDER BY recipe_name LIMIT OFFSET 0
>> ERROR: syntax error at or near "OFFSET" LINE 1: ...R recipe_name LIKE
>> 'a%' ORDER BY recipe_name LIMIT OFFSET 0 ^
>>
> Again, I don't think this was ever correct.
>> I fully expect there will be more after I get these corrected. My
>> setup is as follows:
>
> I haven't used phprecipebook before, but it looks it is generating quite
> incorrect SQL queries. If it was truly written for version 7.2.3, that
> means that it probably hasn't been updated in several years, so you
> might want to look seriously at what phprecipebook offers compared to
> alternatives. I really know nothing about the software, so I could be
> very off base, but the SQL errors you are getting are pretty basic.
>
> Sean

Sean,

Thanks for the help, looks like I have my work cut out for me.
PHPRecipeBook was written for MySQL, but added Postgres as an apparent
afterthought. They have not updated the PG side for some time, but they
claim it did work with 7.2.3. It would appear they have been seduced by
someone with a bias in the other direction.

As far as other options, I haven't found any. There are packages with
fat clients written for KDE (KRecipes) or GNOME (Gourmet) users, but I
have not found anything useful with a web front end. I'm not sure this
is yet, but it's all I could find to try out. I just want something
useful to organize a few thousand family recipes before they are lost.
My mother just turned 82 and we have most of hers stored on paper. But
we have already lost a couple of her and dad's sisters with no records
of theirs. I haven't even begun to talk with my wife's family, and one
daughter in law whose grandmother and aunts used to operate a catering
kitchen.

Thank you,

Bob McConnell
N2SPP

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2007-04-01 06:45:30 Re: Updating old code for new engine
Previous Message Sean Davis 2007-03-31 22:23:28 Re: Updating old code for new engine