[pgsql-jp: 29904] Re: pg_atoi エラーが出る
ohara takaaki
ohr @ yoursys.org
2003年 5月 15日 (木) 19:57:57 JST
お世話になります.オハラです.
>>杉田さん
> ログを採っていて、そのログを見る事ができれば可能です。
ログは全てみることができませんでした.
ブラウザ上に表示させた SQL をコピーして
同じように php から実行してみましたが,エラーは
出ませんでした.
カラムの順番を替えたりいろいろやっていますが,
解決しておりません(情けない><)
>>望月さん
> $textCode = 'str010101954';
> $sql = "INSERT INTO table1(someflg, textCode) VALUES(0,'$textCode')";
> pg_exec($con, $sql);
>
> で、pg_atoiのエラー がでるのは上記以外のカラムが実際は存在するのではない
> でしょうか?
ありがとうございます.
確認はしているのですが見落としているかもしれません.
実際のエラー表示と実際のテーブル構成を下記に:
# クエリ(表示させている)
INSERT INTO table1(
dltflg, ordercode, payment, corporationid, sendflg, usercode,
productcode, itemnumber,discountamount,orderdate,description,
creditcardinfo,comment,price1)
VALUES (
0,'gwI1052993187','bank','1111111',0,1,7,1,0,'1052993187','','','',
'20000')
# エラー
Warning: pg_exec() query failed:
ERROR: pg_atoi: error in "gwI1052993187": can't parse "gwI1052993187" in
/home/my_home/public_html/***
line 238
同じ構成のテーブルに,上記クエリをコピペして php から INSERT 実行しても
エラーはありません(??なぜだ??)
# table1
dltflg | smallint |
code | integer | not null default nextval('"table1_code_seq"'::text)
ordercode | text |
payment | text |
corporationid | text |
sendflg | smallint |
usercode | bigint |
productcode | bigint |
itemnumber | integer |
discountamount | bigint |
orderdate | text |
description | text |
creditcardinfo | text |
comment | text |
price1 | text |
Unique keys: table1_code_key
--
ohara takaaki <ohr @ yoursys.org>
pgsql-jp メーリングリストの案内