SELECT * FROM TGoodstorgmarks WHERE `id_1c` IN (SELECT DISTINCT `torgmark` FROM `TGoods` WHERE `visibility` = '1' AND `1c_hidden`='0' AND `accepted` = '1' AND `avail` > 0 ) ORDER BY `TGoodstorgmarks`.`order`

Table 'newmddb4.TGoods' doesn't exist