Re: Nested Query OK in psql but not in PHP

From: Reed Loefgren <rloef(at)interfold(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Nested Query OK in psql but not in PHP
Date: 2006-05-01 12:42:27
Message-ID: 20060501063554.B17669@auden.jmla.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 1 May 2006, Martijn van Oosterhout wrote:

> On Sun, Apr 30, 2006 at 03:52:29PM -0700, rloef(at)interfold(dot)com wrote:
>> ... Is there something that changes in the PHP code that builds
>> the tabular display if a query is a nested query as opposed to it not
>> being a nested query?
>
> PHP has no idea what a nested query is, let alone understanding SQL.
> You must be doing something else wrong (quoting?).
>
>> I can include some actual cut-'n-paste, but I'd like to try and figure
>> at least some of this out myself first.
>
> We can't help you at all without a cut-n-paste.
>
> Have a nice day,
> --
> Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
>> From each according to his ability. To each according to his ability to litigate.

All,

It is fixed now and, yes, I was doing something wrong. In the query I
referred to a field as s.fieldname, out of habit, to avoid issues with
duplicate fieldnames in joined tables. But when I did the code for the
tabular display $myrow['s.fieldname'] it didn't want that. Dropping the
tablename alias prepend did the trick. And now it's a nice day indeed.

thanks,

r

In response to

Browse pgsql-general by date

  From Date Subject
Next Message chris smith 2006-05-01 12:43:29 Re: Authentication & connection problems
Previous Message Stephen Frost 2006-05-01 12:41:16 Re: Is PostgreSQL an easy choice for a large CMS?