From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
Cc: | shreedhar <shreedhar(at)lucidindia(dot)net>, Postgre General <pgsql-general(at)postgresql(dot)org>, Postgre Admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] PostgreSQL query failed: ERROR: pg_atoi: zero-length |
Date: | 2003-09-23 14:52:02 |
Message-ID: | 3F705E12.4080603@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
>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
From | Date | Subject | |
---|---|---|---|
Next Message | Nick Fankhauser | 2003-09-23 16:38:47 | Problem with n_distinct being consistently inaccurate. |
Previous Message | Nigel J. Andrews | 2003-09-23 11:30:58 | Re: [GENERAL] PostgreSQL query failed: ERROR: pg_atoi: zero-length |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-09-23 14:55:41 | Re: table size |
Previous Message | Montervino, Mariano | 2003-09-23 14:47:20 | Especial delimiters caracter |