RE: [PHP-DB] INSERT statement
| From: | Beau Lebens | Date: | Mon, 21 May 2001 09:00:16 +0000 |
| Subject: | RE: [PHP-DB] INSERT statement | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-9488@lists.php.net to get a copy of this message | ||
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:pawlikb1@poczta.onet.pl]
// Sent: Monday, 21 May 2001 4:54 PM
// To: php-db@lists.php.net
// 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 ]
//