[Dbix-class] Re: how to use a complex query in DBIx::Class

A. Pagaltzis pagaltzis at gmx.de
Sun Dec 31 05:28:49 GMT 2006

* A. Pagaltzis <pagaltzis at gmx.de> [2006-12-31 06:10]:
>     SELECT
>         id,
>         id NOT IN (
>             SELECT boardid
>             FROM hiddenboards
>             WHERE userid = 3
>         ) AS hidden
>     FROM boards
>     WHERE active = 1
>     ORDER BY pos
> Yes, I tested it; it works correctly.

Err, except I pasted the first instead of the second version of
the query which has the superfluous NOT in there so it reverses
the values in the `hidden` column. Sigh. The constructed
resultset is logically correct anyhow, though; no missing or
spuriously duplicated rows.

Aristotle Pagaltzis // <http://plasmasturm.org/>

More information about the Dbix-class mailing list