SELECT a.*, b.nume, b.id FROM retete_sub a INNER JOIN retete b ON (a.reteta_id = b.id) WHERE sub_cat = 51146 - Table 'egustos_egustos.retete_sub' doesn't exist