From: Dmitri Touretsky <dmitri@listsoft.ru>
To: PGSQL <pgsql-php@postgresql.org>
Subject: Get result out of "commit" query...
Date: Thu, 28 Feb 2002 14:10:14 +0300
Message-ID: <654137142.20020228141014@listsoft.ru> (raw)
Good time of the day!
It's easy to work with Postgres from PHP scripts. You can access all
you need - tuples, fields, etc. BUT I was unable to find a way to get
a PostgreSQL reply on queries like "BEGIN" or (more important)
"COMMIT".
E.g. when I execute a query like
$tmp = pg_Exec($connection, "SELECT * ...")
I can get a number of returned tuples with pg_numrows($tmp), etc.
But when I execute
$tmp = pg_Exec($connection, "BEGIN")
I was unable to get anything out of $tmp. And I'm pretty sure
that PostgreSQL's reply "BEGIN" should be somewhere there...
There are a number of such queries and it would be useful to be able
to read output in order to know if things are going good or bad... Any
ideas? Oh, well, and pg_errormessage doesn't work _on such queries_
either - it's empty...
Also, it works fine in Perl script with Pg installed - you simply use
$tmp->cmdStatus
Best regards,
Dmitri ( mailto:dmitri@listsoft.ru )
New SOFT daily (RUS): http://www.listsoft.ru/
(ENG): http://www.listsoft.com/
Articles, tips : http://www.diskovod.ru/
---
User Error: replace user and press any key to continue.
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: dmitri@listsoft.ru
Subject: Re: Get result out of "commit" query...
In-Reply-To: <654137142.20020228141014@listsoft.ru>
References: <654137142.20020228141014@listsoft.ru>
* 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