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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxx


-- 
Sent via pgsql-php mailing list (pgsql-php@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux