Odd "INSERT" Problems with PostgreSQL - Do YOU know?
От | Jason |
---|---|
Тема | Odd "INSERT" Problems with PostgreSQL - Do YOU know? |
Дата | |
Msg-id | NEBBKFAPELEOJBLFNEMJIEPNCOAA.jason@op480.com обсуждение исходный текст |
Ответ на | RE: Connection from Win machine ("Scott Gilbert" <scott.gilbert@netregistry.au.com>) |
Ответы |
Re: Odd "INSERT" Problems with PostgreSQL - Do YOU know?
Re: Odd "INSERT" Problems with PostgreSQL - Do YOU know? |
Список | pgsql-general |
Hi, I am using php. When executing a query I do not get an error. However, when I look at the DB it hasn't added the row and all other rows in the series of queries have been added. I've echo'd the $sql statement and actually ran it through the command line with no problems. The odd thing is, when I do these queries they do not fail, yet they do not insert. It still increases the serial primary key ("id") so when I do a query through the command line the first record for example would start at 12 (becuase i have tried to insert from the php code 12 times prior to adding it manually). Any idea on what the prob is? Here's my sql statement: $sql = "insert into pricing (prod_id, size_id, price) values ($prod_id, $size_id, 0.00)"; here's an example of what it generates before it inserts: insert into pricing (prod_id, size_id, price) values (148, 48, 0.00) the table pricing has the following columns: id - primar key/serial prod_id - int4 size_id - int4 price - float4 Any help would be very much appreciated! Thanks!
В списке pgsql-general по дате отправления: