pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chadwick Rolfs <cmr@shell.gis.net>
To: pgsql-php@postgresql.org <pgsql-php@postgresql.org>
Cc: dan radom <dan@radom.org>
Subject: Re: php insert problem
Date: Wed, 22 May 2002 12:53:01 -0400 (EDT)
Message-ID: <Pine.SOL.3.96.1020522125208.29123D-100000@shell.gis.net> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0205221640150.29366-100000@boyce.ednet.co.uk>

Hey, dan... are you getting these messages?  It seems we have a consensus.
Do you still get an error?

On Wed, 22 May 2002, Chris Thompson wrote:

> 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:
> 
> > <snip>
> >
> >  $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;
> >   }
> >
> > </snip>
> >
> > 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.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

-Chadwick




view thread (7+ messages)

Message-ID: <Pine.SOL.3.96.1020522125208.29123D-100000@shell.gis.net>
Permalink:  ../Pine.SOL.3.96.1020522125208.29123D-100000@shell.gis.net/
Also on:    postgresql.org/message-id/Pine.SOL.3.96.1020522125208.29123D-100000@shell.gis.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: cmr@shell.gis.net, dan@radom.org
  Subject: Re: php insert problem
  In-Reply-To: <Pine.SOL.3.96.1020522125208.29123D-100000@shell.gis.net>
  References: <Pine.LNX.4.33L2.0205221640150.29366-100000@boyce.ednet.co.uk> <Pine.SOL.3.96.1020522125208.29123D-100000@shell.gis.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox