From: Alxander A. Kapralov <sasha@province.ru>
To: Keary Suska <hierophant@pcisys.net>
Cc: Postgres-PHP <pgsql-php@postgresql.org>
Subject: Re: help !!!
Date: Tue, 18 Jun 2002 11:58:37 +0400
Message-ID: <3D0EE82D.9080000@province.ru> (raw)
References: <B9337440.F991%hierophant@pcisys.net>
Keary Suska wrote:
>Are you sure the offending line is the one you think it is? Line numbers
>reported can be misleading since PHP looks at lines differently than most
>text editors. There could possibly be an obscure precedence issue with your
>if() statement. I recommend getting rid of the first pg_exec call (you are
>actually calling the query twice--the pg_exec in the if() statement executes
>the query a second time), and changing the if() statement:
>
>if ( $result = pg_exec( $db, $str ) and $num = pg_numrows($result) ) {
> for ($i = 0; $i < $num; $i++) {
> $r = pg_fetch_object($result, $i);
> echo "<OPTION VALUE=$r->i> $r->gor_n / $r->gaze_n\n";
> };
>};
>
>Note the changed if() statement. This should clarify the precedence.
>
>Keary Suska
>Esoteritech, Inc.
>"Leveraging Open Source for a better Internet"
>
I am so sorry, but this exasperating mistake with repeated call pg_exec
...
Thank you for help.
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: sasha@province.ru, hierophant@pcisys.net
Subject: Re: help !!!
In-Reply-To: <3D0EE82D.9080000@province.ru>
References: <B9337440.F991%hierophant@pcisys.net> <3D0EE82D.9080000@province.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