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

Strange Query Question

From: OTR Comm <otrcomm(at)wildapache(dot)net>
To: PGSQL Novice List <pgsql-novice(at)postgresql(dot)org>
Subject: Strange Query Question
Date: 2000-11-20 19:55:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

I found a query in some code that I am evaluating:

$query = qq|SELECT, ap.invnumber,,   
              acc_trans.transdate, ap.invoice, acc_trans.amount
              FROM ap, acc_trans        
              WHERE $where
              AND acc_trans.accno = $form->{accno}
              AND acc_trans.trans_id =
              AND ap.vendor =|;

The code executes properly, but I do not see how this query can work
without a FROM reference to the vendor table.  How does this happen?

I do not understand how you can have a reference to '' here
with reference to the vendor table (which does exist in the database).

Incidently, '$where' is set to 'true' in previous code prior to building
the query.

Murrah Boswell


pgsql-novice by date

Next:From: Tom LaneDate: 2000-11-20 20:12:57
Subject: Re: Strange Query Question
Previous:From: matDate: 2000-11-20 15:06:58
Subject: Re: Re: [GENERAL] Some problem on the data base server !

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