From: | Chadwick Rolfs <cmr(at)shell(dot)gis(dot)net> |
---|---|
To: | dan radom <dan(at)radom(dot)org> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: php insert problem |
Date: | 2002-05-22 15:33:05 |
Message-ID: | Pine.SOL.3.96.1020522112733.29123A-100000@shell.gis.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
You need to close your parenthesis after the last double quote.
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
>
-Chadwick
From | Date | Subject | |
---|---|---|---|
Next Message | Surojit Niyogi | 2002-05-22 15:35:32 | Re: php insert problem |
Previous Message | dan radom | 2002-05-22 15:06:23 | php insert problem |