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

From Raymond O'Donnell
Subject Re: How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql
Date
Msg-id 5682C041.40706@iol.ie
Whole thread Raw
In response to 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>)
List 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 by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql
Next
From: Raymond O'Donnell
Date:
Subject: Re: How to limit dropdown list to options based on 'in use' rows from lookup table, for webpage using php and postgresql