Re: PG Problems - Mailing list pgsql-general

From Brett W. McCoy
Subject Re: PG Problems
Date
Msg-id Pine.LNX.4.10.10004211019490.15769-100000@chapelperilous.net
Whole thread Raw
In response to PG Problems  (ALASTAIR JOHN TAYLOR <ajt6@aber.ac.uk>)
List pgsql-general
On Fri, 21 Apr 2000, ALASTAIR JOHN TAYLOR wrote:

> --------------------------------------------------------------
> $querytwo = "select timetwo from times where racer='$name'";
> $resulttwo = $conn->exec($querytwo);
>
> $total = $result + $resulttwo;

What is it you think this is supposed to be doing?  You are adding the
dereferenced values of these references to get a third reference?  The
values of $result and $resulttwo aren't what you think they are.  They
don't hold the actual value of a query, just a reference to the tuples
returned from the query.  You still need to 'fecth' those results out,
even if you only have one row returned.

Brett W. McCoy
                                              http://www.chapelperilous.net
---------------------------------------------------------------------------
When I first arrived in this country I had only fifteen cents in my pocket
and a willingness to compromise.
        -- Weber cartoon caption



pgsql-general by date:

Previous
From: ALASTAIR JOHN TAYLOR
Date:
Subject: PG Problems
Next
From: "Samuel A. Mullen"
Date:
Subject: COPY Question