Skip site navigation (1) Skip section navigation (2)

Re: help !!!

From: "Alxander A(dot) Kapralov" <sasha(at)province(dot)ru>
To: Keary Suska <hierophant(at)pcisys(dot)net>
Cc: Postgres-PHP <pgsql-php(at)postgresql(dot)org>
Subject: Re: help !!!
Date: 2002-06-18 07:58:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php

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. 

In response to

pgsql-php by date

Next:From: WorkDate: 2002-06-19 18:44:33
Subject: Optimizing queries
Previous:From: Keary SuskaDate: 2002-06-17 22:08:13
Subject: Re: results from a opinion form

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group