Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 95245475A8A for ; Wed, 22 May 2002 12:52:24 -0400 (EDT) Received: from liszt-02.ednet.co.uk (liszt-02.ednet.co.uk [212.20.226.19]) by postgresql.org (Postfix) with ESMTP id EFC1B475A87 for ; Wed, 22 May 2002 12:52:22 -0400 (EDT) Received: from liszt-02.ednet.co.uk (liszt-02.ednet.co.uk [127.0.0.1]) by mailfilter (Postfix) with ESMTP id 714196D6FD; Wed, 22 May 2002 16:41:30 +0100 (BST) X-Ednet-Emailfilter: 11884-54-1022082090 (for sender thompson@ednet.co.uk) Received: from boyce.ednet.co.uk (unknown [212.20.231.172]) by liszt-02.ednet.co.uk (Postfix) with ESMTP id 164556D6F8; Wed, 22 May 2002 16:41:30 +0100 (BST) Received: from boyce.ednet.co.uk (localhost [127.0.0.1]) by mailfilter (Postfix) with ESMTP id E785517E28; Wed, 22 May 2002 16:41:29 +0100 (BST) Received: from boyce.ednet.co.uk (unknown [212.20.231.172]) by boyce.ednet.co.uk (Postfix) with ESMTP id 5004B17BDB; Wed, 22 May 2002 16:41:15 +0100 (BST) Date: Wed, 22 May 2002 16:41:15 +0100 (BST) From: Chris Thompson To: dan radom Cc: "pgsql-php@postgresql.org" Subject: Re: php insert problem In-Reply-To: <20020522150623.GJ31531@lunar.radom.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Ednet-Emailfilter: banner X-Archive-Number: 200205/84 X-Sequence-Number: 1216 Should it not be $result = pg_exec ($database, "INSERT into employees (emp_name, emp_email) VALUES ('$emp_name','$emp_email');"); Cheers On Wed, 22 May 2002, dan radom wrote: > > > $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 > -- > Virus scanned by edNET. > -- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. Any offers or quotation of service are subject to formal specification. Errors and omissions excepted. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of edNET or lightershade ltd. Finally, the recipient should check this email and any attachments for the presence of viruses. edNET and lightershade ltd accepts no liability for any damage caused by any virus transmitted by this email. -- -- Virus scanned by edNET.