X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id F0CDCD1B546; Tue, 23 Sep 2003 15:00:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 04369-07; Tue, 23 Sep 2003 11:59:41 -0300 (ADT) Received: from hosting.commandprompt.com (218.commandprompt.com [207.173.200.218]) by svr1.postgresql.org (Postfix) with ESMTP id C8735D1BA87; Tue, 23 Sep 2003 11:59:37 -0300 (ADT) Received: from commandprompt.com (clbb-109.saw.net [64.146.135.109]) (authenticated) by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id h8NExUi27767; Tue, 23 Sep 2003 07:59:30 -0700 Message-ID: <3F705E12.4080603@commandprompt.com> Date: Tue, 23 Sep 2003 07:52:02 -0700 From: "Joshua D. Drake" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030716 Thunderbird/0.1a X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Nigel J. Andrews" Cc: shreedhar , Postgre General , Postgre Admin Subject: Re: [GENERAL] PostgreSQL query failed: ERROR: pg_atoi: zero-length References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/374 X-Sequence-Number: 10462 >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. > > Older versions of PostgreSQL would allow a '' to be inserted as an integer base value which is illegal. Newer versions do not allow a '' to be inserted into a integer base value. Thus if you have a query that may return '' as an integer base value, you should run it through a condition to make the '' == NULL which is valid. Sincerely, Joshua Drake