RE: [PHP-DB] INSERT statement

2001-05-21 Thread Beau Lebens
try INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z' quote marks around the $z and make sure you are doing it as query( "INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z'" ); or whatever, using " marks properly :) HTH Beau // -Original

Re: [PHP-DB] INSERT statement

2001-05-21 Thread Russ Michell
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')

Re: [PHP-DB] INSERT statement

2001-05-21 Thread Miles Thompson
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