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 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 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: ERROR: parser: parse error 
// at or near "where" in file.php on line x
// 
// 
// Thanks in advance
// 
// Bartek Pawlik
// Poland
// 
// 
// 
// 
// 
// -- 
// 26 maja - Dzień Matki. Wygraj kwiaty dla swojej Mamy!
// Do rozdania 75 bukietów z dostawą i życzeniami.
// [ http://zakupy.onet.pl/prezenty.asp?k=7 ]
// 

--
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