Get result out of "commit" query...

From: Dmitri Touretsky <dmitri(at)listsoft(dot)ru>
To: PGSQL <pgsql-php(at)postgresql(dot)org>
Subject: Get result out of "commit" query...
Date: 2002-02-28 11:10:14
Message-ID: 654137142.20020228141014@listsoft.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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(at)listsoft(dot)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.

Browse pgsql-php by date

  From Date Subject
Next Message Uğur TEZGEL 2002-02-28 16:01:04
Previous Message Zak Greant 2002-02-28 10:22:39 Re: link problem