Неверный запрос SELECT gt.id idtype, IFNULL(idreg,0) idreg FROM good_types gt LEFT JOIN gt_regs gr on gt.id=gr.idtype WHERE gt.id IN (187,247,354,189,188,185,330,656,657,331,246,190,186,210,243,534,637,762,756)