Re: [GENERAL] PostgreSQL query failed: ERROR: pg_atoi: zero-length - Mailing list pgsql-admin

From Nigel J. Andrews
Subject Re: [GENERAL] PostgreSQL query failed: ERROR: pg_atoi: zero-length
Date
Msg-id Pine.LNX.4.21.0309231227300.22150-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to PostgreSQL query failed: ERROR: pg_atoi: zero-length string  ("shreedhar" <shreedhar@lucidindia.net>)
Responses Re: [GENERAL] PostgreSQL query failed: ERROR: pg_atoi: zero-length  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-admin
On Tue, 23 Sep 2003, shreedhar wrote:

> If I try to delete a record from my table which is giving following error
>
>
> Warning: PostgreSQL query failed: ERROR: pg_atoi: zero-length string in
> /xxx/database.inc on line 73
>
> What might be the problem.

Looks like line 73 of your /xxx/database.inc PHP script is submitting a query
formated with a zero length string instead of a number. Look for the variable
being formated into the query string being undefined thereby leading to the
somethat that looks like:

  delete from aaa where id =

instead of a more normal:

  delete from aaa where id = 44

You wouldn't believe the number of times I've explained that error message to a
PHP developer.

--
Nigel J. Andrews


pgsql-admin by date:

Previous
From: Holger Jakobs
Date:
Subject: pg_hba.conf improvements
Next
From: "Joshua D. Drake"
Date:
Subject: Re: [GENERAL] PostgreSQL query failed: ERROR: pg_atoi: zero-length