Unknown column 'undefined' in 'where clause' select distinct c.ProductId, code, c.uid as id, pt.uid as geraetetyp, pt.name as name, pt.image as image from tx_cnkonfigurator_configuration c left join tx_cnkonfigurator_product p on p.uid = c.ProductId left join tx_cnkonfigurator_producttype pt on pt.uid = p.TypeId where (p.typeid=undefined) and ifnull(pt.deleted,0) = 0 and ifnull(pt.hidden,0) = 0 and ifnull(p.deleted,0) = 0 and ifnull(p.hidden,0) = 0 and ifnull(c.hidden,0) = 0 and ifnull(c.deleted,0) = 0 order by pt.sorting, lower(c.code);