Re: How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql
Дата
Msg-id 5682C041.40706@iol.ie
обсуждение исходный текст
Ответ на How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql  (Killian Driscoll <killiandriscoll@gmail.com>)
Список pgsql-php
On 29/12/2015 17:08, Killian Driscoll wrote:
> While I fix getting kicked off the list I'll reply directly to you if
> that's OK!

No hassle.

<snip>

> Not sure - the php generator I am using states that to create a filter
> condition:
> "Filter condition allows you to reduce the list of values represented in
> the lookup editor with a specified criterion. This condition corresponds
> to the WHERE clause applied to the data source (you must not add the
> WHERE keyword to beginning of the condition)."
>
> So, I need a WHERE condition based on my tables.

How about moving the join into a subquery using EXISTS? - like this:

[where] exists (
  select 1
  from  country_table ct inner join lookup_table lt
    on (ct.country_type_id = lt.country_type_id)
)


Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


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

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql