Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 8DFCD4766A4 for ; Wed, 22 May 2002 11:52:33 -0400 (EDT) Received: from mserv1e.u-net.net (he301war.uk.vianw.net [195.102.249.205]) by postgresql.org (Postfix) with ESMTP id 61FD94760AD for ; Wed, 22 May 2002 11:45:00 -0400 (EDT) Received: from [194.131.122.253] (helo=Peter) by mserv1e.u-net.net with asmtp (Exim 3.36 #7) id 17AYIK-0000Um-00; Wed, 22 May 2002 16:44:56 +0100 Message-ID: <00ab01c201a7$b2ba8690$3d002eac@Peter> From: To: , References: <20020522150623.GJ31531@lunar.radom.org> Subject: Re: php insert problem Date: Wed, 22 May 2002 16:45:28 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Archive-Number: 200205/82 X-Sequence-Number: 1214 You're missing a closing ) $result = pg_exec ($database, "INSERT into employees (emp_name, emp_email) VALUES ('$emp_name','$emp_email')"); Peter ----- Original Message ----- From: "dan radom" To: Sent: Wednesday, May 22, 2002 4:06 PM Subject: [PHP] php insert problem > > > $database = pg_connect ("host=localhost dbname=rbak user=nobody") or die("database connection failed"); > $result = pg_exec ($database, "INSERT into employees (emp_name, emp_email) VALUES ('$emp_name','$emp_email')"; > > if (!$result) { > echo "query died\n"; > exit; > } > > > > the above code produces a parse error. "parse error, unexpected ';' in blah.php on line X" > > line X is the $result = pg_exec ($database, "INSERT into employees (emp_name, emp_email) VALUES ('$emp_name','$emp_email')"; line. I've started at this long enough, and it's time for other eyes to look. any ideas? similar SELECT queries work just fine. > > dan > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > > >