Re: php insert problem - Mailing list pgsql-php

From Surojit Niyogi
Subject Re: php insert problem
Date
Msg-id 3CEBBAC4.6060107@bungeecode.com
Whole thread Raw
In response to php insert problem  (dan radom <dan@radom.org>)
List pgsql-php
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?
similarSELECT queries work just fine. 
>
>dan
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
>



pgsql-php by date:

Previous
From: dan radom
Date:
Subject: php insert problem
Next
From: Chadwick Rolfs
Date:
Subject: Re: php insert problem