Strange Query Question

Поиск
Список
Период
Сортировка
От OTR Comm
Тема Strange Query Question
Дата
Msg-id 3A1981AD.70540BD4@wildapache.net
обсуждение исходный текст
Ответы Re: Strange Query Question
Список pgsql-novice
Hello,

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

$query = qq|SELECT ap.id, ap.invnumber, vendor.name,
              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 = ap.id
              AND ap.vendor = vendor.id|;

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 'vendor.id' 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.

Thanks,
Murrah Boswell


В списке pgsql-novice по дате отправления:

Предыдущее
От: mat@reynerie.yi.org
Дата:
Сообщение: Re: Re: [GENERAL] Some problem on the data base server !
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Strange Query Question