Re: custom filter on join

2009-06-23 Thread Alex Gaynor
On Tue, Jun 23, 2009 at 3:11 AM, nevvkid wrote: > > Hello together, > i wonder if it's possible to add a custom filter to a join "ON". E.g. > a query: > > SELECT * FROM `table` INNER JOIN `table_attribute` ON (`table`.`id` = > `table_attribute`.`lamp_id` AND foo=bar); > > Please have a look at "f

custom filter on join

2009-06-23 Thread nevvkid
Hello together, i wonder if it's possible to add a custom filter to a join "ON". E.g. a query: SELECT * FROM `table` INNER JOIN `table_attribute` ON (`table`.`id` = `table_attribute`.`lamp_id` AND foo=bar); Please have a look at "foo=bar". There is a method "filter" for django models, but that'