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 INSERT is used to create a new row,
not update a current row.  The UPDATE command is more I think what you're

UPDATE table SET column2 = '$x', column4 = '$y' WHERE column1 = '$z'

Try that and see what it does for you.


Craig Vincent

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to