pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Surojit Niyogi <surojit@bungeecode.com>
To: dan@radom.org <dan@radom.org>
Cc: pgsql-php@postgresql.org
Subject: Re: php insert problem
Date: Wed, 22 May 2002 10:35:32 -0500
Message-ID: <3CEBBAC4.6060107@bungeecode.com> (raw)
References: <20020522150623.GJ31531@lunar.radom.org>

Hi Dan,

You're missing a close parentheses ")" in the pg_exec line... :)

Roj Niyogi
pgHoster.com
PostgreSQL web hosting

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





view thread (7+ messages)  latest in thread

Message-ID: <3CEBBAC4.6060107@bungeecode.com>
Permalink:  ../3CEBBAC4.6060107@bungeecode.com/
Also on:    postgresql.org/message-id/3CEBBAC4.6060107@bungeecode.com

 · 

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: surojit@bungeecode.com, dan@radom.org
  Subject: Re: php insert problem
  In-Reply-To: <3CEBBAC4.6060107@bungeecode.com>
  References: <20020522150623.GJ31531@lunar.radom.org> <3CEBBAC4.6060107@bungeecode.com>

* 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