Bartek,
Saw all the other replies, and they are correct, but what you want now is
an UPDATE, not an INSERT. You have the record, you are amending it.
Miles
At 10:54 AM 5/21/01 +0200, Bartek Pawlik wrote:
>Hi,
>I have problem with INSERT statement in PostgresSQL v.7.0.3.
>In one script I insert
I have problem with INSERT statement in PostgresSQL v.7.0.3.
In one script I insert values in column1,column3,column5.
Later I want to fill column2 and column4.
I use
INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE (column1 = $z)
Php shows:
INSERT can't contain a WHERE clause as I
I don't use PostgresSQL, but the SQL can't be that different:
INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 =
'$z'
//Loose the brackets after the WHERE clause, and add single quotes
//around your variable.
Russ
INSERT INTO table (column2,column4) VALUES ('$x','$y') WHE
);
or whatever, using " marks properly :)
HTH
Beau
// -Original Message-
// From: Bartek Pawlik [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 21 May 2001 4:54 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] INSERT statement
//
//
// Hi,
// I have problem with INSERT statement
Hi,
I have problem with INSERT statement in PostgresSQL v.7.0.3.
In one script I insert values in column1,column3,column5.
Later I want to fill column2 and column4.
I use
INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE (column1 = $z)
Php shows:
Warning: PostgreSQL query failed: ERRO