[Dbix-class] Joins and subqueries

Jess Robinson castaway at desert-island.demon.co.uk
Thu Jan 19 10:11:10 CET 2006


Now, if only DBIx::Class could do joins with non-equality condition 
clauses.. According to the Std (1999 at least), join clauses can have any 
conditions that WHERE clauses can, so they could even be BETWEEN, etc. 
(Not that I'm sure which actual DBs go that far)

Hmm, now there's an idea.. something that takes STD-SQL, and downgrades it 
to what is actually supported per DB.. ;)

Jess


On Wed, 18 Jan 2006, Jess Robinson wrote:

> 
> First, you convert those particular ones to using JOIN instead, then you 
> solve ;)
> 
>     SELECT *
>        FROM fw_menu
>      WHERE menu_id NOT IN (SELECT child_id FROM fw_menulink)
>      AND menu_id NOT IN
>      (SELECT menu_id FROM fw_usermenu WHERE usergroup_id = ?)
> 



More information about the Dbix-class mailing list